Skip to content

Commit c3c8018

Browse files
author
TAiGA
committed
Style
1 parent 069b5fa commit c3c8018

File tree

5 files changed

+27
-15
lines changed

5 files changed

+27
-15
lines changed

libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenI
303303
304304
*/
305305

306-
#if (NONOSDK >= (0x30000-1))
306+
#if (NONOSDK >= (0x30000 - 1))
307307

308308
#ifdef DEBUG_ESP_WIFI
309309
if (listenInterval && type == WIFI_NONE_SLEEP)
@@ -334,9 +334,9 @@ bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenI
334334
}
335335
}
336336
}
337-
#else // (NONOSDK >= (0x30000-1))
337+
#else // (NONOSDK >= (0x30000 - 1))
338338
(void)listenInterval;
339-
#endif // (NONOSDK >= (0x30000-1))
339+
#endif // (NONOSDK >= (0x30000 - 1))
340340

341341
bool ret = wifi_set_sleep_type((sleep_type_t) type);
342342
if (!ret) {
@@ -571,7 +571,7 @@ bool ESP8266WiFiGenericClass::forceSleepWake() {
571571
* @return interval
572572
*/
573573
uint8_t ESP8266WiFiGenericClass::getListenInterval () {
574-
#if (NONOSDK >= (0x30000-1))
574+
#if (NONOSDK >= (0x30000 - 1))
575575
return wifi_get_listen_interval();
576576
#else
577577
return 0;
@@ -583,7 +583,7 @@ uint8_t ESP8266WiFiGenericClass::getListenInterval () {
583583
* @return true if max level
584584
*/
585585
bool ESP8266WiFiGenericClass::isSleepLevelMax () {
586-
#if (NONOSDK >= (0x30000-1))
586+
#if (NONOSDK >= (0x30000 - 1))
587587
return wifi_get_sleep_level() == MAX_SLEEP_T;
588588
#else
589589
return false;

libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static bool sta_config_equal(const station_config& lhs, const station_config& rh
6161
*/
6262
static bool sta_config_equal(const station_config& lhs, const station_config& rhs) {
6363

64-
#if (NONOSDK >= (0x30000-1))
64+
#if (NONOSDK >= (0x30000 - 1))
6565
static_assert(sizeof(station_config) == 116, "struct station_config has changed, please update comparison function");
6666
#else
6767
static_assert(sizeof(station_config) == 112, "struct station_config has changed, please update comparison function");
@@ -94,7 +94,7 @@ static bool sta_config_equal(const station_config& lhs, const station_config& rh
9494
return false;
9595
}
9696

97-
#if (NONOSDK >= (0x30000-1))
97+
#if (NONOSDK >= (0x30000 - 1))
9898
if(lhs.open_and_wep_mode_disable != rhs.open_and_wep_mode_disable) {
9999
return false;
100100
}
@@ -166,7 +166,7 @@ wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase,
166166
}
167167

168168
conf.threshold.rssi = -127;
169-
#if (NONOSDK >= (0x30000-1))
169+
#if (NONOSDK >= (0x30000 - 1))
170170
conf.open_and_wep_mode_disable = !(_useInsecureWEP || *conf.password == 0);
171171
#endif
172172
#if (NONOSDK >= (0x30200))

tests/host/common/user_interface.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ extern "C"
8585
config->bssid[i] = i;
8686
config->threshold.rssi = 1;
8787
config->threshold.authmode = AUTH_WPA_PSK;
88-
#if (NONOSDK >= (0x30000-1))
88+
#if (NONOSDK >= (0x30000 - 1))
8989
config->open_and_wep_mode_disable = true;
9090
#endif
9191
#if (NONOSDK >= (0x30200))
92-
config->channel = 1;
92+
config->channel = 1;
9393
config->all_channel_scan = true;
9494
#endif
9595
return true;
@@ -215,7 +215,7 @@ extern "C"
215215
return STATION_MODE;
216216
}
217217

218-
#if (NONOSDK >= (0x30000-1))
218+
#if (NONOSDK >= (0x30000 - 1))
219219

220220
sleep_level_t wifi_get_sleep_level(void)
221221
{
@@ -271,7 +271,7 @@ extern "C"
271271
return true;
272272
}
273273

274-
#if (NONOSDK >= (0x30000-1))
274+
#if (NONOSDK >= (0x30000 - 1))
275275

276276
bool wifi_set_sleep_level(sleep_level_t level)
277277
{

tools/boards.txt.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,6 +1670,18 @@ def sdk ():
16701670
('.menu.sdk.nonosdk221.build.sdk', 'NONOSDK221'),
16711671
('.menu.sdk.nonosdk3v0', 'nonos-sdk pre-3 (180626 known issues)'),
16721672
('.menu.sdk.nonosdk3v0.build.sdk', 'NONOSDK3V0'),
1673+
('.menu.sdk.nonosdk300', 'nonos-sdk 3.0.0'),
1674+
('.menu.sdk.nonosdk300.build.sdk', 'NONOSDK300'),
1675+
('.menu.sdk.nonosdk301', 'nonos-sdk 3.0.1'),
1676+
('.menu.sdk.nonosdk301.build.sdk', 'NONOSDK301'),
1677+
('.menu.sdk.nonosdk302', 'nonos-sdk 3.0.2'),
1678+
('.menu.sdk.nonosdk302.build.sdk', 'NONOSDK302'),
1679+
('.menu.sdk.nonosdk303', 'nonos-sdk 3.0.3'),
1680+
('.menu.sdk.nonosdk303.build.sdk', 'NONOSDK303'),
1681+
('.menu.sdk.nonosdk304', 'nonos-sdk 3.0.4'),
1682+
('.menu.sdk.nonosdk304.build.sdk', 'NONOSDK304'),
1683+
('.menu.sdk.nonosdk305', 'nonos-sdk 3.0.5'),
1684+
('.menu.sdk.nonosdk305.build.sdk', 'NONOSDK305'),
16731685
])
16741686
}
16751687

tools/sdk/include/user_interface.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define __USER_INTERFACE_H__
2727

2828
#if defined(NONOSDK3V0)
29-
#define NONOSDK (0x30000-1)
29+
#define NONOSDK (0x30000 - 1)
3030
#elif defined(NONOSDK300)
3131
#define NONOSDK (0x30000)
3232
#elif defined(NONOSDK301)
@@ -276,7 +276,7 @@ struct station_config {
276276
// with both ssid[] and bssid[] matched. Please check about this.
277277
uint8 bssid[6];
278278
wifi_fast_scan_threshold_t threshold;
279-
#if (NONOSDK >= (0x30000-1))
279+
#if (NONOSDK >= (0x30000 - 1))
280280
bool open_and_wep_mode_disable; // Can connect to open/wep router by default.
281281
#endif
282282
#if (NONOSDK >= (0x30200))
@@ -464,7 +464,7 @@ typedef enum {
464464
MODEM_SLEEP_T
465465
} sleep_type_t;
466466

467-
#if (NONOSDK >= (0x30000-1))
467+
#if (NONOSDK >= (0x30000 - 1))
468468

469469
typedef enum {
470470
MIN_SLEEP_T,

0 commit comments

Comments
 (0)