Skip to content

Commit 80d3d4f

Browse files
authored
Merge pull request #748 from JAndrassy/ethernet_apply_mac
Ethernet - apply MAC address in begin(mac)
2 parents ee2590e + 21b7bf3 commit 80d3d4f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/Ethernet/src/Ethernet.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ int arduino::EthernetClass::begin(uint8_t *mac, unsigned long timeout, unsigned
99
if (eth_if == nullptr) return 0;
1010
}
1111

12+
if (mac != nullptr) {
13+
eth_if->get_emac().set_hwaddr(mac);
14+
}
15+
1216
unsigned long start = millis();
1317
eth_if->set_blocking(false);
1418
eth_if->connect();

0 commit comments

Comments
 (0)