Skip to content

Commit

Permalink
Merge pull request #748 from JAndrassy/ethernet_apply_mac
Browse files Browse the repository at this point in the history
Ethernet - apply MAC address in begin(mac)
  • Loading branch information
facchinm authored Nov 13, 2023
2 parents ee2590e + 21b7bf3 commit 80d3d4f
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 80d3d4f

Please sign in to comment.