Skip to content

Commit b40a9ad

Browse files
committed
Ethernet - standard MACAddress getter with a parameter
1 parent 05feca5 commit b40a9ad

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Diff for: libraries/Ethernet/src/Ethernet.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ uint8_t *CEthernet::MACAddress(void) {
174174
return mac_address;
175175
}
176176

177+
void CEthernet::MACAddress(uint8_t *mac) {
178+
MACAddress();
179+
memcpy(mac, mac_address, 6);
180+
}
181+
177182
IPAddress CEthernet::localIP() {
178183
if(ni != nullptr) {
179184
return IPAddress(ni->getIpAdd());

Diff for: libraries/Ethernet/src/EthernetC33.h

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class CEthernet {
6262

6363

6464
uint8_t *MACAddress(void);
65+
void MACAddress(uint8_t *mac);
6566
IPAddress localIP();
6667
IPAddress subnetMask();
6768
IPAddress gatewayIP();

0 commit comments

Comments
 (0)