mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
sdk: update to 2.2.0
- update libraries and header files - remove libmesh - update PHY init data
This commit is contained in:
parent
f9ac524b13
commit
429f40d321
@ -31,7 +31,7 @@
|
||||
static const uint8_t ICACHE_FLASH_ATTR phy_init_data[128] =
|
||||
{
|
||||
[0] = 5, // Reserved, do not change
|
||||
[1] = 0, // Reserved, do not change
|
||||
[1] = 8, // Reserved, do not change
|
||||
[2] = 4, // Reserved, do not change
|
||||
[3] = 2, // Reserved, do not change
|
||||
[4] = 5, // Reserved, do not change
|
||||
@ -68,12 +68,12 @@ static const uint8_t ICACHE_FLASH_ATTR phy_init_data[128] =
|
||||
[32] = 0xf8, // Reserved, do not change
|
||||
[33] = 0xf8, // Reserved, do not change
|
||||
|
||||
[34] = 82, // target_power_qdb_0, 82 means target power is 82/4=20.5dbm
|
||||
[35] = 78, // target_power_qdb_1, 78 means target power is 78/4=19.5dbm
|
||||
[36] = 74, // target_power_qdb_2, 74 means target power is 74/4=18.5dbm
|
||||
[37] = 68, // target_power_qdb_3, 68 means target power is 68/4=17dbm
|
||||
[38] = 64, // target_power_qdb_4, 64 means target power is 64/4=16dbm
|
||||
[39] = 56, // target_power_qdb_5, 56 means target power is 56/4=14dbm
|
||||
[34] = 78, // target_power_qdb_0, target power is 78/4=19.5dbm
|
||||
[35] = 74, // target_power_qdb_1, target power is 74/4=18.5dbm
|
||||
[36] = 70, // target_power_qdb_2, target power is 70/4=17.5dbm
|
||||
[37] = 64, // target_power_qdb_3, target power is 64/4=16dbm
|
||||
[38] = 60, // target_power_qdb_4, target power is 60/4=15dbm
|
||||
[39] = 56, // target_power_qdb_5, target power is 56/4=14dbm
|
||||
|
||||
[40] = 0, // target_power_index_mcs0
|
||||
[41] = 0, // target_power_index_mcs1
|
||||
|
@ -38,7 +38,7 @@ compiler.S.flags=-c -g -x assembler-with-cpp -MMD -mlongcalls
|
||||
compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start {build.float} -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-L{compiler.libc.path}/lib" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read
|
||||
|
||||
compiler.c.elf.cmd=xtensa-lx106-elf-gcc
|
||||
compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lmesh -lwpa2 -lstdc++ -lm -lc -lgcc
|
||||
compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc
|
||||
|
||||
compiler.cpp.cmd=xtensa-lx106-elf-g++
|
||||
compiler.cpp.flags=-c {compiler.warning_flags} -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections
|
||||
|
@ -53,7 +53,7 @@ env.Prepend(
|
||||
join(FRAMEWORK_DIR, "tools", "sdk", "libc", "xtensa-lx106-elf", "lib")
|
||||
],
|
||||
LIBS=[
|
||||
"mesh", "wpa2", "smartconfig", "espnow", "pp", "main", "wpa", "lwip_gcc",
|
||||
"wpa2", "smartconfig", "espnow", "pp", "main", "wpa", "lwip_gcc",
|
||||
"net80211", "wps", "crypto", "phy", "hal", "axtls", "gcc",
|
||||
"m", "c", "stdc++"
|
||||
]
|
||||
|
@ -127,6 +127,7 @@ enum espconn_option{
|
||||
ESPCONN_NODELAY = 0x02,
|
||||
ESPCONN_COPY = 0x04,
|
||||
ESPCONN_KEEPALIVE = 0x08,
|
||||
ESPCONN_MANUALRECV = 0x10,
|
||||
ESPCONN_END
|
||||
};
|
||||
|
||||
|
@ -188,6 +188,16 @@ typedef enum _auth_mode {
|
||||
AUTH_MAX
|
||||
} AUTH_MODE;
|
||||
|
||||
typedef enum _cipher_type {
|
||||
CIPHER_NONE = 0,
|
||||
CIPHER_WEP40,
|
||||
CIPHER_WEP104,
|
||||
CIPHER_TKIP,
|
||||
CIPHER_CCMP,
|
||||
CIPHER_TKIP_CCMP,
|
||||
CIPHER_UNKNOWN,
|
||||
} CIPHER_TYPE;
|
||||
|
||||
uint8 wifi_get_opmode(void);
|
||||
uint8 wifi_get_opmode_default(void);
|
||||
bool wifi_set_opmode(uint8 opmode);
|
||||
@ -209,6 +219,13 @@ struct bss_info {
|
||||
sint16 freqcal_val;
|
||||
uint8 *esp_mesh_ie;
|
||||
uint8 simple_pair;
|
||||
CIPHER_TYPE pairwise_cipher;
|
||||
CIPHER_TYPE group_cipher;
|
||||
uint32_t phy_11b:1;
|
||||
uint32_t phy_11g:1;
|
||||
uint32_t phy_11n:1;
|
||||
uint32_t wps:1;
|
||||
uint32_t reserved:28;
|
||||
};
|
||||
|
||||
typedef struct _scaninfo {
|
||||
@ -222,12 +239,18 @@ typedef struct _scaninfo {
|
||||
|
||||
typedef void (* scan_done_cb_t)(void *arg, STATUS status);
|
||||
|
||||
typedef struct {
|
||||
int8 rssi;
|
||||
AUTH_MODE authmode;
|
||||
} wifi_fast_scan_threshold_t;
|
||||
|
||||
struct station_config {
|
||||
uint8 ssid[32];
|
||||
uint8 password[64];
|
||||
uint8 bssid_set; // Note: If bssid_set is 1, station will just connect to the router
|
||||
// with both ssid[] and bssid[] matched. Please check about this.
|
||||
uint8 bssid[6];
|
||||
wifi_fast_scan_threshold_t threshold;
|
||||
};
|
||||
|
||||
bool wifi_station_get_config(struct station_config *config);
|
||||
@ -245,12 +268,27 @@ typedef enum {
|
||||
WIFI_SCAN_TYPE_PASSIVE, /**< passive scan */
|
||||
} wifi_scan_type_t;
|
||||
|
||||
/** @brief Range of active scan times per channel */
|
||||
typedef struct {
|
||||
uint32_t min; /**< minimum active scan time per channel, units: millisecond */
|
||||
uint32_t max; /**< maximum active scan time per channel, units: millisecond, values above 1500ms may
|
||||
cause station to disconnect from AP and are not recommended. */
|
||||
} wifi_active_scan_time_t;
|
||||
|
||||
/** @brief Aggregate of active & passive scan time per channel */
|
||||
typedef union {
|
||||
wifi_active_scan_time_t active; /**< active scan time per channel, units: millisecond. */
|
||||
uint32_t passive; /**< passive scan time per channel, units: millisecond, values above 1500ms may
|
||||
cause station to disconnect from AP and are not recommended. */
|
||||
} wifi_scan_time_t;
|
||||
|
||||
struct scan_config {
|
||||
uint8 *ssid; // Note: ssid == NULL, don't filter ssid.
|
||||
uint8 *bssid; // Note: bssid == NULL, don't filter bssid.
|
||||
uint8 channel; // Note: channel == 0, scan all channels, otherwise scan set channel.
|
||||
uint8 show_hidden; // Note: show_hidden == 1, can get hidden ssid routers' info.
|
||||
wifi_scan_type_t scan_type; // scan type, active or passive
|
||||
wifi_scan_time_t scan_time; // scan time per channel
|
||||
};
|
||||
|
||||
bool wifi_station_scan(struct scan_config *config, scan_done_cb_t cb);
|
||||
@ -412,6 +450,7 @@ enum {
|
||||
EVENT_SOFTAPMODE_STADISCONNECTED,
|
||||
EVENT_SOFTAPMODE_PROBEREQRECVED,
|
||||
EVENT_OPMODE_CHANGED,
|
||||
EVENT_SOFTAPMODE_DISTRIBUTE_STA_IP,
|
||||
EVENT_MAX
|
||||
};
|
||||
|
||||
@ -477,6 +516,12 @@ typedef struct {
|
||||
uint8 aid;
|
||||
} Event_SoftAPMode_StaConnected_t;
|
||||
|
||||
typedef struct {
|
||||
uint8 mac[6];
|
||||
struct ip_addr ip;
|
||||
uint8 aid;
|
||||
} Event_SoftAPMode_Distribute_Sta_IP_t;
|
||||
|
||||
typedef struct {
|
||||
uint8 mac[6];
|
||||
uint8 aid;
|
||||
@ -500,6 +545,7 @@ typedef union {
|
||||
Event_SoftAPMode_StaConnected_t sta_connected;
|
||||
Event_SoftAPMode_StaDisconnected_t sta_disconnected;
|
||||
Event_SoftAPMode_ProbeReqRecved_t ap_probereqrecved;
|
||||
Event_SoftAPMode_Distribute_Sta_IP_t distribute_sta_ip;
|
||||
Event_OpMode_Change_t opmode_changed;
|
||||
} Event_Info_u;
|
||||
|
||||
@ -655,6 +701,49 @@ void wifi_disable_gpio_wakeup(void);
|
||||
|
||||
void uart_div_modify(uint8 uart_no, uint32 DivLatchValue);
|
||||
|
||||
typedef enum {
|
||||
WIFI_COUNTRY_POLICY_AUTO, /**< Country policy is auto, use the country info of AP to which the station is connected */
|
||||
WIFI_COUNTRY_POLICY_MANUAL, /**< Country policy is manual, always use the configured country info */
|
||||
} WIFI_COUNTRY_POLICY;
|
||||
|
||||
typedef struct {
|
||||
char cc[3]; /**< country code string */
|
||||
uint8_t schan; /**< start channel */
|
||||
uint8_t nchan; /**< total channel number */
|
||||
uint8_t policy; /**< country policy */
|
||||
} wifi_country_t;
|
||||
|
||||
/**
|
||||
* @brief configure country info
|
||||
*
|
||||
* @attention 1. The default country is {.cc="CN", .schan=1, .nchan=13, policy=WIFI_COUNTRY_POLICY_AUTO}
|
||||
* @attention 2. When the country policy is WIFI_COUNTRY_POLICY_AUTO, use the country info of AP to which the station is
|
||||
* connected. E.g. if the configured country info is {.cc="USA", .schan=1, .nchan=11}, the country info of
|
||||
* the AP to which the station is connected is {.cc="JP", .schan=1, .nchan=14}, then our country info is
|
||||
* {.cc="JP", .schan=1, .nchan=14}. If the station disconnected from the AP, the country info back to
|
||||
* {.cc="USA", .schan=1, .nchan=11} again.
|
||||
* @attention 3. When the country policy is WIFI_COUNTRY_POLICY_MANUAL, always use the configured country info.
|
||||
* @attention 4. When the country info is changed because of configuration or because the station connects to a different
|
||||
* external AP, the country IE in probe response/beacon of the soft-AP is changed also.
|
||||
* @attention 5. The country configuration is not stored into flash
|
||||
*
|
||||
* @param wifi_country_t *country: the configured country info
|
||||
*
|
||||
* @return 0 : succeed
|
||||
* @return -1 : fail
|
||||
*/
|
||||
bool wifi_set_country(wifi_country_t *country);
|
||||
|
||||
/**
|
||||
* @brief get the current country info
|
||||
*
|
||||
* @param wifi_country_t *country: country info
|
||||
*
|
||||
* @return 0 : succeed
|
||||
* @return -1 : fail
|
||||
*/
|
||||
bool wifi_get_country(wifi_country_t *country);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
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.
Loading…
x
Reference in New Issue
Block a user