Skip to content

Commit be5d98f

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

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libraries/Ethernet/src/Ethernet.cpp

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

177+
void CEthernet::MACAddress(uint8_t *mac) {
178+
CLwipIf::getInstance().getMacAddress(NI_ETHERNET, mac);
179+
}
180+
177181
IPAddress CEthernet::localIP() {
178182
if(ni != nullptr) {
179183
return IPAddress(ni->getIpAdd());

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)