Skip to content

Commit 2d46782

Browse files
committed
WiFi: deprecate MACAddress(uint8_t *mac_address) keeping reversed returned value
1 parent 03b4d18 commit 2d46782

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

libraries/WiFi/src/WiFi.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,14 @@ void arduino::WiFiClass::statusCallback(nsapi_event_t status, intptr_t param)
306306
}
307307
}
308308

309-
void arduino::WiFiClass::MACAddress(uint8_t *mac_address)
310-
{
311-
macAddress(mac_address);
309+
void arduino::WiFiClass::MACAddress(uint8_t *mac_address) {
310+
/* implementation in SocketHelpers.cpp
311+
* arduino::MbedSocketClass::macAddress(uint8_t* mac, bool reversed)
312+
*/
313+
macAddress(mac_address, true);
312314
}
313315

316+
314317
#if defined(COMPONENT_4343W_FS)
315318

316319
#define WIFI_FIRMWARE_PATH "/wlan/4343WA1.BIN"

libraries/WiFi/src/WiFi.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@ class WiFiClass : public MbedSocketClass {
6565
*/
6666
int begin(const char* ssid);
6767

68-
void MACAddress(uint8_t *mac_address);
68+
/*
69+
* Get the interface MAC address.
70+
*
71+
* This function is deprecated and returns mac address in reversed order
72+
* please use uint8_t* macAddress(uint8_t *mac_address) instead
73+
*/
74+
void MACAddress(uint8_t *mac_address) __attribute__ ((deprecated("Use macAddress(uint8_t *mac_address)")));
6975

7076
/* Start Wifi connection with passphrase
7177
* the most secure supported mode will be automatically selected

0 commit comments

Comments
 (0)