Skip to content

Commit 936a7eb

Browse files
authored
Merge pull request #384 from pennam/unor4-mac-len
WiFiS3: add WL_MAC_ADDR_LENGTH definition
2 parents 273873d + f0251e0 commit 936a7eb

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: libraries/WiFiS3/src/WiFi.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static bool macStr2macArray(uint8_t *mac_out, const char *mac_in) {
219219
return false;
220220
}
221221

222-
for(int i = 0; i < 6; i++) {
222+
for(int i = 0; i < WL_MAC_ADDR_LENGTH; i++) {
223223
std::string str_num(mac_in+(i*3),2);
224224
*(mac_out+i) = std::stoul(str_num,nullptr,16);
225225
}

Diff for: libraries/WiFiS3/src/WiFi.h

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020

2121
#define WIFI_FIRMWARE_LATEST_VERSION "0.4.1"
22+
#define WL_MAC_ADDR_LENGTH 6
2223

2324
class CAccessPoint {
2425
public:

0 commit comments

Comments
 (0)