Skip to content

Commit cc737df

Browse files
committed
Ethernet C33: set default mac address to Arduino OUI
Former-commit-id: e5e1fec
1 parent ad5a50a commit cc737df

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

libraries/Ethernet/src/EthernetDriver.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ uint8_t *eth_get_tx_buffer(uint16_t *size) {
8080
/* -------------------------------------------------------------------------- */
8181
EthernetDriver::EthernetDriver() {
8282
/* -------------------------------------------------------------------------- */
83-
8483

8584
/* default MAC ADDRESS */
86-
mac_address[0] = 0xAA;
87-
mac_address[1] = 0xBB;
88-
mac_address[2] = 0xCC;
89-
mac_address[3] = 0xDD;
90-
mac_address[4] = 0xEE;
91-
mac_address[5] = 0xFF;
85+
const bsp_unique_id_t* t = R_BSP_UniqueIdGet();
86+
mac_address[0] = 0xA8;
87+
mac_address[1] = 0x61;
88+
mac_address[2] = 0x0A;
89+
mac_address[3] = t->unique_id_words[0] ^ t->unique_id_words[1];
90+
mac_address[4] = t->unique_id_words[2];
91+
mac_address[5] = t->unique_id_words[3];
9292

9393
/* ethernet PHY _________________________________________________________ */
9494
phy_cfg.channel = ETHERNET_CHANNEL;

0 commit comments

Comments
 (0)