1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-06 05:21:22 +03:00

add optional espressif fw nonos-sdk 2.2.x (19.03.13) (#5873)

This commit is contained in:
david gauchard 2019-03-14 13:35:26 +01:00 committed by GitHub
parent e5b4de3633
commit a3ea816e65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 27 additions and 17 deletions

View File

@ -350,9 +350,11 @@ generic.menu.led.14=14
generic.menu.led.14.build.led=-DLED_BUILTIN=14 generic.menu.led.14.build.led=-DLED_BUILTIN=14
generic.menu.led.15=15 generic.menu.led.15=15
generic.menu.led.15.build.led=-DLED_BUILTIN=15 generic.menu.led.15.build.led=-DLED_BUILTIN=15
generic.menu.sdk.nonosdk221=nonos-sdk 2.2.1 generic.menu.sdk.nonosdk221=nonos-sdk 2.2.1 (legacy)
generic.menu.sdk.nonosdk221.build.sdk=NONOSDK221 generic.menu.sdk.nonosdk221.build.sdk=NONOSDK221
generic.menu.sdk.nonosdk3v0=nonos-sdk pre-3 generic.menu.sdk.nonosdk222=nonos-sdk 2.2.2-190313 (testing)
generic.menu.sdk.nonosdk222.build.sdk=NONOSDK22x
generic.menu.sdk.nonosdk3v0=nonos-sdk pre-3 (known issues)
generic.menu.sdk.nonosdk3v0.build.sdk=NONOSDK3V0 generic.menu.sdk.nonosdk3v0.build.sdk=NONOSDK3V0
generic.menu.ip.lm2f=v2 Lower Memory generic.menu.ip.lm2f=v2 Lower Memory
generic.menu.ip.lm2f.build.lwip_include=lwip2/include generic.menu.ip.lm2f.build.lwip_include=lwip2/include

View File

@ -249,13 +249,13 @@ int32_t ESP8266WiFiGenericClass::channel(void) {
* @param type sleep_type_t * @param type sleep_type_t
* @return bool * @return bool
*/ */
#ifdef NONOSDK221 #ifndef NONOSDK3V0
bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenInterval) { bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenInterval) {
(void)type; (void)type;
(void)listenInterval; (void)listenInterval;
return false; return false;
} }
#else // !defined(NONOSDK221) #else // defined(NONOSDK3V0)
bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenInterval) { bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenInterval) {
/** /**
@ -322,7 +322,7 @@ bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenI
} }
return ret; return ret;
} }
#endif // !defined(NONOSDK221) #endif // defined(NONOSDK3V0)
/** /**
* get Sleep mode * get Sleep mode
@ -507,7 +507,7 @@ bool ESP8266WiFiGenericClass::forceSleepWake() {
* @return interval * @return interval
*/ */
uint8_t ESP8266WiFiGenericClass::getListenInterval () { uint8_t ESP8266WiFiGenericClass::getListenInterval () {
#ifdef NONOSDK221 #ifndef NONOSDK3V0
return 0; return 0;
#else #else
return wifi_get_listen_interval(); return wifi_get_listen_interval();
@ -519,7 +519,7 @@ uint8_t ESP8266WiFiGenericClass::getListenInterval () {
* @return true if max level * @return true if max level
*/ */
bool ESP8266WiFiGenericClass::isSleepLevelMax () { bool ESP8266WiFiGenericClass::isSleepLevelMax () {
#ifdef NONOSDK221 #ifndef NONOSDK3V0
return false; return false;
#else #else
return wifi_get_sleep_level() == MAX_SLEEP_T; return wifi_get_sleep_level() == MAX_SLEEP_T;

View File

@ -138,7 +138,7 @@ wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase,
} }
conf.threshold.rssi = -127; conf.threshold.rssi = -127;
#ifndef NONOSDK221 #ifdef NONOSDK3V0
conf.open_and_wep_mode_disable = !(_useInsecureWEP || *conf.password == 0); conf.open_and_wep_mode_disable = !(_useInsecureWEP || *conf.password == 0);
#endif #endif

View File

@ -84,7 +84,7 @@ bool wifi_station_get_config (struct station_config *config)
config->bssid[i] = i; config->bssid[i] = i;
config->threshold.rssi = 1; config->threshold.rssi = 1;
config->threshold.authmode = AUTH_WPA_PSK; config->threshold.authmode = AUTH_WPA_PSK;
#ifndef NONOSDK221 #ifdef NONOSDK3V0
config->open_and_wep_mode_disable = true; config->open_and_wep_mode_disable = true;
#endif #endif
return true; return true;
@ -192,7 +192,7 @@ uint8 wifi_get_opmode_default (void)
return STATION_MODE; return STATION_MODE;
} }
#ifndef NONOSDK221 #ifdef NONOSDK3V0
sleep_level_t wifi_get_sleep_level (void) sleep_level_t wifi_get_sleep_level (void)
{ {
@ -248,7 +248,7 @@ bool wifi_set_phy_mode (phy_mode_t mode)
return true; return true;
} }
#ifndef NONOSDK221 #ifdef NONOSDK3V0
bool wifi_set_sleep_level (sleep_level_t level) bool wifi_set_sleep_level (sleep_level_t level)
{ {

View File

@ -1332,9 +1332,11 @@ def led (default,max):
def sdk (): def sdk ():
return { 'sdk': collections.OrderedDict([ return { 'sdk': collections.OrderedDict([
('.menu.sdk.nonosdk221', 'nonos-sdk 2.2.1'), ('.menu.sdk.nonosdk221', 'nonos-sdk 2.2.1 (legacy)'),
('.menu.sdk.nonosdk221.build.sdk', 'NONOSDK221'), ('.menu.sdk.nonosdk221.build.sdk', 'NONOSDK221'),
('.menu.sdk.nonosdk3v0', 'nonos-sdk pre-3'), ('.menu.sdk.nonosdk222', 'nonos-sdk 2.2.2-190313 (testing)'),
('.menu.sdk.nonosdk222.build.sdk', 'NONOSDK22x'),
('.menu.sdk.nonosdk3v0', 'nonos-sdk pre-3 (known issues)'),
('.menu.sdk.nonosdk3v0.build.sdk', 'NONOSDK3V0'), ('.menu.sdk.nonosdk3v0.build.sdk', 'NONOSDK3V0'),
]) ])
} }

View File

@ -140,7 +140,12 @@ if "PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3" in flatten_cppdefines:
CPPDEFINES=[("NONOSDK3V0", 1)], CPPDEFINES=[("NONOSDK3V0", 1)],
LIBPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lib", "NONOSDK3V0"),] LIBPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lib", "NONOSDK3V0"),]
) )
# PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK221 (default) elif "PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x" in flatten_cppdefines:
env.Append(
CPPDEFINES=[("NONOSDK22x", 1)],
LIBPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lib", "NONOSDK22x"),]
)
# PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x (default)
else: else:
env.Append( env.Append(
CPPDEFINES=[("NONOSDK221", 1)], CPPDEFINES=[("NONOSDK221", 1)],

View File

@ -253,7 +253,7 @@ struct station_config {
// with both ssid[] and bssid[] matched. Please check about this. // with both ssid[] and bssid[] matched. Please check about this.
uint8 bssid[6]; uint8 bssid[6];
wifi_fast_scan_threshold_t threshold; wifi_fast_scan_threshold_t threshold;
#ifndef NONOSDK221 #ifdef NONOSDK3V0
bool open_and_wep_mode_disable; // Can connect to open/wep router by default. bool open_and_wep_mode_disable; // Can connect to open/wep router by default.
#endif #endif
}; };
@ -434,7 +434,7 @@ typedef enum {
MODEM_SLEEP_T MODEM_SLEEP_T
} sleep_type_t; } sleep_type_t;
#ifndef NONOSDK221 #ifdef NONOSDK3V0
typedef enum { typedef enum {
MIN_SLEEP_T, MIN_SLEEP_T,

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
v2.2.1-61-gc7b580c (shows as SDK:2.2.2-dev(c0eb301) in debug mode)