Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3581fc2

Browse files
committed
WiFiC3: add missing WL*_LENGTH definitions
1 parent 1b67e53 commit 3581fc2

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

‎libraries/lwIpWrapper/src/CNetIf.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -537,17 +537,17 @@ int CLwipIf::getMacAddress(NetIfType_t type, uint8_t* mac)
537537
MAC.mode = WIFI_MODE_STA;
538538
if (CEspControl::getInstance().getWifiMacAddress(MAC) == ESP_CONTROL_OK) {
539539
CNetUtilities::macStr2macArray(mac, MAC.mac);
540-
rv = MAC_ADDRESS_DIM;
540+
rv = WL_MAC_ADDR_LENGTH;
541541
}
542542
} else if (type == NI_WIFI_SOFTAP) {
543543
MAC.mode = WIFI_MODE_AP;
544544
if (CEspControl::getInstance().getWifiMacAddress(MAC) == ESP_CONTROL_OK) {
545545
CNetUtilities::macStr2macArray(mac, MAC.mac);
546-
rv = MAC_ADDRESS_DIM;
546+
rv = WL_MAC_ADDR_LENGTH;
547547
}
548548
} else {
549549
eth_get_mac_address(mac);
550-
rv = MAC_ADDRESS_DIM;
550+
rv = WL_MAC_ADDR_LENGTH;
551551
}
552552

553553
CLwipIf::getInstance().restartAsyncRequest();

‎libraries/lwIpWrapper/src/CNetIf.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,21 @@
3434
#endif
3535

3636
#define MAX_SOFAT_CONNECTION_DEF 5
37-
38-
#define MAC_ADDRESS_DIM 6
3937
#define NETWORK_INTERFACES_MAX_NUM 3
4038
#define MAX_HOSTNAME_DIM 253
4139

4240
#define WIFI_INIT_TIMEOUT_MS 10000
4341

42+
// Maximum size of a SSID
43+
#define WL_SSID_MAX_LENGTH 32
44+
// Length of passphrase. Valid lengths are 8-63.
45+
#define WL_WPA_KEY_MAX_LENGTH 63
46+
// Length of key in bytes. Valid values are 5 and 13.
47+
#define WL_WEP_KEY_MAX_LENGTH 13
48+
// Size of a MAC-address or BSSID
4449
#define WL_MAC_ADDR_LENGTH 6
50+
// Size of a MAC-address or BSSID
51+
#define WL_IPV4_LENGTH 4
4552

4653
/* DEFAULT ADDRESS FOR ETHERNET CONFIGURATION */
4754

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /