Skip to content

Commit

Permalink
Ethernet - apply MAC address in begin(mac)
Browse files Browse the repository at this point in the history
tested with "ENC28J60 Mbed EMAC" and "Nano 33 BLE"
  • Loading branch information
JAndrassy committed Oct 31, 2023
1 parent fee275d commit 21b7bf3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/Ethernet/src/Ethernet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ int arduino::EthernetClass::begin(uint8_t *mac, unsigned long timeout, unsigned
if (eth_if == nullptr) return 0;
}

if (mac != nullptr) {
eth_if->get_emac().set_hwaddr(mac);
}

unsigned long start = millis();
eth_if->set_blocking(false);
eth_if->connect();
Expand Down

0 comments on commit 21b7bf3

Please sign in to comment.