IDF release/v3.3 71df1f742

esp-face: master 420fc7e
esp32-camera: master 0107093
This commit is contained in:
Me No Dev
2021-01-11 14:20:02 +02:00
committed by GitHub
parent 5f98370707
commit 2452c1fb53
115 changed files with 706 additions and 308 deletions

View File

@ -84,21 +84,6 @@ esp_err_t esp_coex_status_bit_set(esp_coex_status_type_t type, uint32_t status);
*/
esp_err_t esp_coex_status_bit_clear(esp_coex_status_type_t type, uint32_t status);
/**
* @brief Enable BLE connection dynamic priority
* @attention If the parameter is true, BLE connection performance will be better but WiFi performance
* will be poorer. And vice versa.
* @param low_interval : true - Increase BLE connection priority to be higher than WiFi's when BLE
* connection interval is less or equal than 50 ms. The default value
* is false.
* false - not increace
* @param high_interval : true - Increase BLE connection priority to be higher than WiFi's when BLE
* connection interval is more than 50 ms. The default value is true.
* false - not increace
* @return : ESP_OK - success, other - failed
*/
esp_err_t esp_coex_ble_conn_dynamic_prio_enable(bool low_interval, bool high_interval);
#ifdef __cplusplus
}
#endif

View File

@ -112,44 +112,73 @@ int coex_wifi_request(uint32_t event, uint32_t latency, uint32_t duration);
int coex_wifi_release(uint32_t event);
/**
* @brief Blue tooth requests coexistence.
* @brief Set WiFi channel to coexistence module.
*
* @param event : blue tooth event
* @param latency : blue tooth will request coexistence after latency
* @param duration : duration for blue tooth to request coexistence
* @param primary : WiFi primary channel
* @param secondary : WiFi secondary channel
* @return : 0 - success, other - failed
*/
int coex_bt_request(uint32_t event, uint32_t latency, uint32_t duration);
int coex_wifi_channel_set(uint8_t primary, uint8_t secondary);
/**
* @brief Blue tooth release coexistence.
* @brief Clear coexistence status.
*
* @param event : blue tooth event
* @param type : Coexistence status type
* @param status: Coexistence status
*/
void coex_schm_status_bit_clear(uint32_t type, uint32_t status);
/**
* @brief Set coexistence status.
*
* @param type : Coexistence status type
* @param status: Coexistence status
*/
void coex_schm_status_bit_set(uint32_t type, uint32_t status);
/**
* @brief Set coexistence scheme interval.
*
* @param interval : Coexistence scheme interval
* @return : 0 - success, other - failed
*/
int coex_bt_release(uint32_t event);
int coex_schm_interval_set(uint32_t interval);
/**
* @brief Register callback function for blue tooth.
* @brief Get coexistence scheme interval.
*
* @param cb : callback function
* @return : Coexistence scheme interval
*/
uint32_t coex_schm_interval_get(void);
/**
* @brief Get current coexistence scheme period.
*
* @return : Coexistence scheme period
*/
uint8_t coex_schm_curr_period_get(void);
/**
* @brief Get current coexistence scheme phase.
*
* @return : Coexistence scheme phase
*/
void * coex_schm_curr_phase_get(void);
/**
* @brief Set current coexistence scheme phase index.
*
* @param interval : Coexistence scheme phase index
* @return : 0 - success, other - failed
*/
int coex_register_bt_cb(coex_func_cb_t cb);
int coex_schm_curr_phase_idx_set(int idx);
/**
* @brief Lock before reset base band.
* @brief Get current coexistence scheme phase index.
*
* @return : lock value
* @return : Coexistence scheme phase index
*/
uint32_t coex_bb_reset_lock(void);
/**
* @brief Unlock after reset base band.
*
* @param restore : lock value
*/
void coex_bb_reset_unlock(uint32_t restore);
int coex_schm_curr_phase_idx_get(void);
/**
* @brief Register coexistence adapter functions.

View File

@ -106,6 +106,9 @@ typedef struct {
tcpip_adapter_ip6_info_t ip6_info;
} system_event_got_ip6_t;
/** Argument structure of SYSTEM_EVENT_STA_WPS_ER_SUCCESS event */
typedef wifi_event_sta_wps_er_success_t system_event_sta_wps_er_success_t;
typedef struct {
uint8_t mac[6]; /**< MAC address of the station connected to ESP32 soft-AP */
uint8_t aid; /**< the aid that ESP32 soft-AP gives to the station connected to */
@ -133,6 +136,7 @@ typedef union {
system_event_sta_got_ip_t got_ip; /**< ESP32 station got IP, first time got IP or when IP is changed */
system_event_sta_wps_er_pin_t sta_er_pin; /**< ESP32 station WPS enrollee mode PIN code received */
system_event_sta_wps_fail_reason_t sta_er_fail_reason;/**< ESP32 station WPS enrollee mode failed reason code received */
system_event_sta_wps_er_success_t sta_er_success; /*!< ESP32 station WPS enrollee success */
system_event_ap_staconnected_t sta_connected; /**< a station connected to ESP32 soft-AP */
system_event_ap_stadisconnected_t sta_disconnected; /**< a station disconnected to ESP32 soft-AP */
system_event_ap_probe_req_rx_t ap_probereqrecved; /**< ESP32 soft-AP receive probe request packet */

View File

@ -252,7 +252,7 @@ esp_err_t esp_now_mod_peer(const esp_now_peer_info_t *peer);
esp_err_t esp_now_get_peer(const uint8_t *peer_addr, esp_now_peer_info_t *peer);
/**
* @brief Fetch a peer from peer list
* @brief Fetch a peer from peer list. Only return the peer which address is unicast, for the multicast/broadcast address, the function will ignore and try to find the next in the peer list.
*
* @param from_head fetch from head of list or not
* @param peer peer information

View File

@ -89,10 +89,8 @@ esp_err_t esp_sleep_disable_wakeup_source(esp_sleep_source_t source);
/**
* @brief Enable wakeup by ULP coprocessor
* @note In revisions 0 and 1 of the ESP32, ULP wakeup source
* can not be used when RTC_PERIPH power domain is forced
* to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup
* source is used.
* @note ULP wakeup source cannot be used when RTC_PERIPH power domain is forced
* to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup source is used.
* @return
* - ESP_OK on success
* - ESP_ERR_NOT_SUPPORTED if additional current by touch (CONFIG_ESP32_RTC_EXTERNAL_CRYSTAL_ADDITIONAL_CURRENT) is enabled.
@ -112,8 +110,7 @@ esp_err_t esp_sleep_enable_timer_wakeup(uint64_t time_in_us);
/**
* @brief Enable wakeup by touch sensor
*
* @note In revisions 0 and 1 of the ESP32, touch wakeup source
* can not be used when RTC_PERIPH power domain is forced
* @note Touch wakeup source cannot be used when RTC_PERIPH power domain is forced
* to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup
* source is used.
*
@ -148,8 +145,7 @@ touch_pad_t esp_sleep_get_touchpad_wakeup_status();
* @note This function does not modify pin configuration. The pin is
* configured in esp_sleep_start, immediately before entering sleep mode.
*
* @note In revisions 0 and 1 of the ESP32, ext0 wakeup source
* can not be used together with touch or ULP wakeup sources.
* @note ext0 wakeup source cannot be used together with touch or ULP wakeup sources.
*
* @param gpio_num GPIO number used as wakeup source. Only GPIOs which are have RTC
* functionality can be used: 0,2,4,12-15,25-27,32-39.
@ -206,8 +202,7 @@ esp_err_t esp_sleep_enable_ext1_wakeup(uint64_t mask, esp_sleep_ext1_wakeup_mode
* wakeup level, for each GPIO which is used for wakeup.
* Then call this function to enable wakeup feature.
*
* @note In revisions 0 and 1 of the ESP32, GPIO wakeup source
* can not be used together with touch or ULP wakeup sources.
* @note GPIO wakeup source cannot be used together with touch or ULP wakeup sources.
*
* @return
* - ESP_OK on success

View File

@ -85,7 +85,7 @@ extern "C" {
#define ESP_ERR_WIFI_NOT_CONNECT (ESP_ERR_WIFI_BASE + 15) /*!< Station still in disconnect status */
#define ESP_ERR_WIFI_POST (ESP_ERR_WIFI_BASE + 18) /*!< Failed to post the event to WiFi task */
#define ESP_ERR_WIFI_INIT_STATE (ESP_ERR_WIFI_BASE + 19) /*!< Invalod WiFi state when init/deinit is called */
#define ESP_ERR_WIFI_INIT_STATE (ESP_ERR_WIFI_BASE + 19) /*!< Invalid WiFi state when init/deinit is called */
#define ESP_ERR_WIFI_STOP_STATE (ESP_ERR_WIFI_BASE + 20) /*!< Returned when WiFi is stopping */
/**
@ -110,6 +110,7 @@ typedef struct {
int wifi_task_core_id; /**< WiFi Task Core ID */
int beacon_max_len; /**< WiFi softAP maximum length of the beacon */
int mgmt_sbuf_num; /**< WiFi management short buffer number, the minimum value is 6, the maximum value is 32 */
uint64_t feature_caps; /**< Enables additional WiFi features and capabilities */
int magic; /**< WiFi init magic number, it should be the last field */
} wifi_init_config_t;
@ -156,6 +157,7 @@ typedef struct {
#endif
extern const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
extern uint64_t g_wifi_feature_caps;
#define WIFI_INIT_CONFIG_MAGIC 0x1F2F3F4F
@ -208,6 +210,7 @@ extern const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
.wifi_task_core_id = WIFI_TASK_CORE_ID,\
.beacon_max_len = WIFI_SOFTAP_BEACON_MAX_LEN, \
.mgmt_sbuf_num = WIFI_MGMT_SBUF_NUM, \
.feature_caps = g_wifi_feature_caps, \
.magic = WIFI_INIT_CONFIG_MAGIC\
};
@ -304,7 +307,7 @@ esp_err_t esp_wifi_stop(void);
* @brief Restore WiFi stack persistent settings to default values
*
* This function will reset settings made using the following APIs:
* - esp_wifi_get_auto_connect,
* - esp_wifi_set_bandwidth,
* - esp_wifi_set_protocol,
* - esp_wifi_set_config related
* - esp_wifi_set_mode
@ -904,32 +907,8 @@ esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx);
* @attention 3. Mapping Table {Power, max_tx_power} = {{8, 2}, {20, 5}, {28, 7}, {34, 8}, {44, 11},
* {52, 13}, {56, 14}, {60, 15}, {66, 16}, {72, 18}, {78, 20}}.
* @attention 4. Param power unit is 0.25dBm, range is [8, 78] corresponding to 2dBm - 20dBm.
* @attention 5. Relationship between set value and actual value. As follows:
* +------------+--------------+
* | set value | actual value |
* +============+==============+
* | [8, 19] | 8 |
* +------------+--------------+
* | [20, 27] | 20 |
* +------------+--------------+
* | [28, 33] | 28 |
* +------------+--------------+
* | [34, 43] | 34 |
* +------------+--------------+
* | [44, 51] | 44 |
* +------------+--------------+
* | [52, 55] | 52 |
* +------------+--------------+
* | [56, 59] | 56 |
* +------------+--------------+
* | [60, 65] | 60 |
* +------------+--------------+
* | [66, 71] | 66 |
* +------------+--------------+
* | [72, 77] | 72 |
* +------------+--------------+
* | 78 | 78 |
* +------------+--------------+
* @attention 5. Relationship between set value and actual value. As follows: {set value range, actual value} = {{[8, 19],8}, {[20, 27],20}, {[28, 33],28}, {[34, 43],34}, {[44, 51],44}, {[52, 55],52}, {[56, 59],56}, {[60, 65],60}, {[66, 71],66}, {[72, 77],72}, {78,78}}
*
* @param power Maximum WiFi transmitting power.
*
* @return
@ -1144,6 +1123,17 @@ esp_err_t esp_wifi_set_inactive_time(wifi_interface_t ifx, uint16_t sec);
*/
esp_err_t esp_wifi_get_inactive_time(wifi_interface_t ifx, uint16_t *sec);
/**
* @brief Dump WiFi statistics
*
* @param modules statistic modules to be dumped
*
* @return
* - ESP_OK: succeed
* - others: failed
*/
esp_err_t esp_wifi_statis_dump(uint32_t modules);
#ifdef __cplusplus
}
#endif

View File

@ -51,7 +51,8 @@ typedef struct {
*
*/
typedef enum {
WIFI_LOG_ERROR = 0, /*enabled by default*/
WIFI_LOG_NONE = 0,
WIFI_LOG_ERROR, /*enabled by default*/
WIFI_LOG_WARNING, /*enabled by default*/
WIFI_LOG_INFO, /*enabled by default*/
WIFI_LOG_DEBUG, /*can be set in menuconfig*/

View File

@ -21,7 +21,7 @@
extern "C" {
#endif
#define ESP_WIFI_OS_ADAPTER_VERSION 0x00000004
#define ESP_WIFI_OS_ADAPTER_VERSION 0x00000005
#define ESP_WIFI_OS_ADAPTER_MAGIC 0xDEADBEAF
#define OSI_FUNCS_TIME_BLOCKING 0xffffffff
@ -127,6 +127,15 @@ typedef struct {
void (* _coex_condition_set)(uint32_t type, bool dissatisfy);
int32_t (* _coex_wifi_request)(uint32_t event, uint32_t latency, uint32_t duration);
int32_t (* _coex_wifi_release)(uint32_t event);
int (* _coex_wifi_channel_set)(uint8_t primary, uint8_t secondary);
void (* _coex_schm_status_bit_clear)(uint32_t type, uint32_t status);
void (* _coex_schm_status_bit_set)(uint32_t type, uint32_t status);
int (* _coex_schm_interval_set)(uint32_t interval);
uint32_t (* _coex_schm_interval_get)(void);
uint8_t (* _coex_schm_curr_period_get)(void);
void * (* _coex_schm_curr_phase_get)(void);
int (* _coex_schm_curr_phase_idx_set)(int idx);
int (* _coex_schm_curr_phase_idx_get)(void);
int32_t _magic;
} wifi_osi_funcs_t;

View File

@ -216,7 +216,7 @@ typedef struct {
wifi_auth_mode_t authmode; /**< Auth mode of ESP32 soft-AP. Do not support AUTH_WEP in soft-AP mode */
uint8_t ssid_hidden; /**< Broadcast SSID or not, default 0, broadcast the SSID */
uint8_t max_connection; /**< Max number of stations allowed to connect in, default 4, max 10 */
uint16_t beacon_interval; /**< Beacon interval, 100 ~ 60000 ms, default 100 ms */
uint16_t beacon_interval; /**< Beacon interval which should be multiples of 100. Unit: TU(time unit, 1 TU = 1024 us). Range: 100 ~ 60000. Default value: 100 */
} wifi_ap_config_t;
/** @brief STA configuration settings for the ESP32 */
@ -502,6 +502,19 @@ typedef enum {
WIFI_IOCTL_MAX,
} wifi_ioctl_cmd_t;
#define MAX_SSID_LEN 32
#define MAX_PASSPHRASE_LEN 64
#define MAX_WPS_AP_CRED 3
/** Argument structure for WIFI_EVENT_STA_WPS_ER_SUCCESS event */
typedef struct {
uint8_t ap_cred_cnt; /**< Number of AP credentials received */
struct {
uint8_t ssid[MAX_SSID_LEN]; /**< SSID of AP */
uint8_t passphrase[MAX_PASSPHRASE_LEN]; /**< Passphrase for the AP */
} ap_cred[MAX_WPS_AP_CRED]; /**< All AP credentials received from WPS handshake */
} wifi_event_sta_wps_er_success_t;
/**
* @brief Configuration for STA's HT2040 coexist management
*
@ -520,6 +533,12 @@ typedef struct {
} data; /**< Configuration of ioctl command */
} wifi_ioctl_config_t;
#define WIFI_STATIS_BUFFER (1<<0)
#define WIFI_STATIS_RXTX (1<<1)
#define WIFI_STATIS_HW (1<<2)
#define WIFI_STATIS_DIAG (1<<3)
#define WIFI_STATIS_ALL (-1)
#ifdef __cplusplus
}
#endif

View File

@ -538,6 +538,13 @@ esp_rom_spiflash_result_t esp_rom_spiflash_wait_idle(esp_rom_spiflash_chip_t *sp
*/
void esp_rom_spiflash_select_qio_pins(uint8_t wp_gpio_num, uint32_t spiconfig);
/**
* @brief Clear WEL bit unconditionally.
*
* @return always ESP_ROM_SPIFLASH_RESULT_OK
*/
esp_rom_spiflash_result_t esp_rom_spiflash_write_disable(void);
/** @brief Global esp_rom_spiflash_chip_t structure used by ROM functions
*
*/