1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-09-09 18:40:33 +03:00

Added NONOS SDK 3.0.0 ~ 3.0.5 (again) (#8736)

* Added NONOS SDK 3.0.0 ~ 3.0.5

* Added user_pre_init

* rf_cal[0] !=0x05,is 0x00

* # Remove mem_manager.o from libmain.a to use custom heap implementation, and time.o to fix redefinition of time-related functions
# Rename `hostname` and `default_hostname` symbols

* user_rf_pre_init

* Add system_func1() called by system_restart_local()

* Add commit log text

* Fixed user_rf_pre_init

* Style

* pio sdks

Co-authored-by: TAiGA <>
Co-authored-by: Maxim Prokhorov <prokhorov.max@outlook.com>
This commit is contained in:
metarutaiga
2022-12-06 18:43:48 +08:00
committed by GitHub
parent ed6b957164
commit 93537f94a8
88 changed files with 2889 additions and 57 deletions

View File

@@ -61,7 +61,7 @@ static bool sta_config_equal(const station_config& lhs, const station_config& rh
*/
static bool sta_config_equal(const station_config& lhs, const station_config& rhs) {
#ifdef NONOSDK3V0
#if (NONOSDK >= (0x30000 - 1))
static_assert(sizeof(station_config) == 116, "struct station_config has changed, please update comparison function");
#else
static_assert(sizeof(station_config) == 112, "struct station_config has changed, please update comparison function");
@@ -94,8 +94,18 @@ static bool sta_config_equal(const station_config& lhs, const station_config& rh
return false;
}
#ifdef NONOSDK3V0
if (lhs.open_and_wep_mode_disable != rhs.open_and_wep_mode_disable) {
#if (NONOSDK >= (0x30000 - 1))
if(lhs.open_and_wep_mode_disable != rhs.open_and_wep_mode_disable) {
return false;
}
#endif
#if (NONOSDK >= (0x30200))
if(lhs.channel != rhs.channel) {
return false;
}
if(lhs.all_channel_scan != rhs.all_channel_scan) {
return false;
}
#endif
@@ -156,9 +166,13 @@ wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase,
}
conf.threshold.rssi = -127;
#ifdef NONOSDK3V0
#if (NONOSDK >= (0x30000 - 1))
conf.open_and_wep_mode_disable = !(_useInsecureWEP || *conf.password == 0);
#endif
#if (NONOSDK >= (0x30200))
conf.channel = channel;
conf.all_channel_scan = true;
#endif
if(bssid) {
conf.bssid_set = 1;