mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-01 04:50:58 +02:00
Update IDF to v3.2 977854975 (#2771)
* Update IDF to v3.2 977854975 * Update app_httpd.cpp
This commit is contained in:
59
tools/sdk/include/esp32/esp_coexist_adapter.h
Normal file
59
tools/sdk/include/esp32/esp_coexist_adapter.h
Normal file
@ -0,0 +1,59 @@
|
||||
// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef __ESP_COEXIST_ADAPTER_H__
|
||||
#define __ESP_COEXIST_ADAPTER_H__
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define COEX_ADAPTER_VERSION 0x00000001
|
||||
#define COEX_ADAPTER_MAGIC 0xDEADBEAF
|
||||
|
||||
#define COEX_ADAPTER_FUNCS_TIME_BLOCKING 0xffffffff
|
||||
|
||||
typedef struct {
|
||||
int32_t _version;
|
||||
void *(* _spin_lock_create)(void);
|
||||
void (* _spin_lock_delete)(void *lock);
|
||||
uint32_t (*_int_disable)(void *mux);
|
||||
void (*_int_enable)(void *mux, uint32_t tmp);
|
||||
void (*_task_yield_from_isr)(void);
|
||||
void *(*_semphr_create)(uint32_t max, uint32_t init);
|
||||
void (*_semphr_delete)(void *semphr);
|
||||
int32_t (*_semphr_take_from_isr)(void *semphr, void *hptw);
|
||||
int32_t (*_semphr_give_from_isr)(void *semphr, void *hptw);
|
||||
int32_t (*_semphr_take)(void *semphr, uint32_t block_time_tick);
|
||||
int32_t (*_semphr_give)(void *semphr);
|
||||
int32_t (* _is_in_isr)(void);
|
||||
void * (* _malloc_internal)(size_t size);
|
||||
void (* _free)(void *p);
|
||||
void (* _timer_disarm)(void *timer);
|
||||
void (* _timer_done)(void *ptimer);
|
||||
void (* _timer_setfn)(void *ptimer, void *pfunction, void *parg);
|
||||
void (* _timer_arm_us)(void *ptimer, uint32_t us, bool repeat);
|
||||
int64_t (* _esp_timer_get_time)(void);
|
||||
int32_t _magic;
|
||||
} coex_adapter_funcs_t;
|
||||
|
||||
extern coex_adapter_funcs_t g_coex_adapter_funcs;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ESP_COEXIST_ADAPTER_H__ */
|
163
tools/sdk/include/esp32/esp_coexist_internal.h
Normal file
163
tools/sdk/include/esp32/esp_coexist_internal.h
Normal file
@ -0,0 +1,163 @@
|
||||
// Copyright 2018-2018 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef __ESP_COEXIST_INTERNAL_H__
|
||||
#define __ESP_COEXIST_INTERNAL_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "esp_coexist_adapter.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
COEX_PREFER_WIFI = 0,
|
||||
COEX_PREFER_BT,
|
||||
COEX_PREFER_BALANCE,
|
||||
COEX_PREFER_NUM,
|
||||
} coex_prefer_t;
|
||||
|
||||
typedef void (* coex_func_cb_t)(uint32_t event, int sched_cnt);
|
||||
|
||||
/**
|
||||
* @brief Init software coexist
|
||||
* extern function for internal use.
|
||||
*
|
||||
* @return Init ok or failed.
|
||||
*/
|
||||
esp_err_t coex_init(void);
|
||||
|
||||
/**
|
||||
* @brief De-init software coexist
|
||||
* extern function for internal use.
|
||||
*/
|
||||
void coex_deinit(void);
|
||||
|
||||
/**
|
||||
* @brief Pause software coexist
|
||||
* extern function for internal use.
|
||||
*/
|
||||
void coex_pause(void);
|
||||
|
||||
/**
|
||||
* @brief Resume software coexist
|
||||
* extern function for internal use.
|
||||
*/
|
||||
void coex_resume(void);
|
||||
|
||||
/**
|
||||
* @brief Get software coexist version string
|
||||
* extern function for internal use.
|
||||
* @return : version string
|
||||
*/
|
||||
const char *coex_version_get(void);
|
||||
|
||||
/**
|
||||
* @brief Coexist performance preference set from libbt.a
|
||||
* extern function for internal use.
|
||||
*
|
||||
* @param prefer : the prefer enumeration value
|
||||
* @return : ESP_OK - success, other - failed
|
||||
*/
|
||||
esp_err_t coex_preference_set(coex_prefer_t prefer);
|
||||
|
||||
/**
|
||||
* @brief Get software coexist status.
|
||||
* @return : software coexist status
|
||||
*/
|
||||
uint32_t coex_status_get(void);
|
||||
|
||||
/**
|
||||
* @brief WiFi requests coexistence.
|
||||
*
|
||||
* @param event : WiFi event
|
||||
* @param latency : WiFi will request coexistence after latency
|
||||
* @param duration : duration for WiFi to request coexistence
|
||||
* @return : 0 - success, other - failed
|
||||
*/
|
||||
int coex_wifi_request(uint32_t event, uint32_t latency, uint32_t duration);
|
||||
|
||||
/**
|
||||
* @brief WiFi release coexistence.
|
||||
*
|
||||
* @param event : WiFi event
|
||||
* @return : 0 - success, other - failed
|
||||
*/
|
||||
int coex_wifi_release(uint32_t event);
|
||||
|
||||
/**
|
||||
* @brief Blue tooth requests coexistence.
|
||||
*
|
||||
* @param event : blue tooth event
|
||||
* @param latency : blue tooth will request coexistence after latency
|
||||
* @param duration : duration for blue tooth to request coexistence
|
||||
* @return : 0 - success, other - failed
|
||||
*/
|
||||
int coex_bt_request(uint32_t event, uint32_t latency, uint32_t duration);
|
||||
|
||||
/**
|
||||
* @brief Blue tooth release coexistence.
|
||||
*
|
||||
* @param event : blue tooth event
|
||||
* @return : 0 - success, other - failed
|
||||
*/
|
||||
int coex_bt_release(uint32_t event);
|
||||
|
||||
/**
|
||||
* @brief Register callback function for blue tooth.
|
||||
*
|
||||
* @param cb : callback function
|
||||
* @return : 0 - success, other - failed
|
||||
*/
|
||||
int coex_register_bt_cb(coex_func_cb_t cb);
|
||||
|
||||
/**
|
||||
* @brief Lock before reset base band.
|
||||
*
|
||||
* @return : lock value
|
||||
*/
|
||||
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);
|
||||
|
||||
/**
|
||||
* @brief Register coexistence adapter functions.
|
||||
*
|
||||
* @param funcs : coexistence adapter functions
|
||||
* @return : ESP_OK - success, other - failed
|
||||
*/
|
||||
esp_err_t esp_coex_adapter_register(coex_adapter_funcs_t *funcs);
|
||||
|
||||
/**
|
||||
* @brief Check the MD5 values of the coexistence adapter header files in IDF and WiFi library
|
||||
*
|
||||
* @attention 1. It is used for internal CI version check
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_WIFI_INVALID_ARG : MD5 check fail
|
||||
*/
|
||||
esp_err_t esp_coex_adapter_funcs_md5_check(const char *md5);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ESP_COEXIST_INTERNAL_H__ */
|
@ -110,6 +110,7 @@ typedef struct {
|
||||
int rx_ba_win; /**< WiFi Block Ack RX window size */
|
||||
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 */
|
||||
int magic; /**< WiFi init magic number, it should be the last field */
|
||||
} wifi_init_config_t;
|
||||
|
||||
@ -183,6 +184,12 @@ extern const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
|
||||
#define WIFI_SOFTAP_BEACON_MAX_LEN 752
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_MGMT_SBUF_NUM
|
||||
#define WIFI_MGMT_SBUF_NUM CONFIG_ESP32_WIFI_MGMT_SBUF_NUM
|
||||
#else
|
||||
#define WIFI_MGMT_SBUF_NUM 32
|
||||
#endif
|
||||
|
||||
#define WIFI_INIT_CONFIG_DEFAULT() { \
|
||||
.event_handler = &esp_event_send, \
|
||||
.osi_funcs = &g_wifi_osi_funcs, \
|
||||
@ -201,6 +208,7 @@ extern const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
|
||||
.rx_ba_win = WIFI_DEFAULT_RX_BA_WIN,\
|
||||
.wifi_task_core_id = WIFI_TASK_CORE_ID,\
|
||||
.beacon_max_len = WIFI_SOFTAP_BEACON_MAX_LEN, \
|
||||
.mgmt_sbuf_num = WIFI_MGMT_SBUF_NUM, \
|
||||
.magic = WIFI_INIT_CONFIG_MAGIC\
|
||||
};
|
||||
|
||||
@ -1094,6 +1102,19 @@ esp_err_t esp_wifi_set_ant(const wifi_ant_config_t *config);
|
||||
*/
|
||||
esp_err_t esp_wifi_get_ant(wifi_ant_config_t *config);
|
||||
|
||||
/**
|
||||
* @brief A general API to set/get WiFi internal configuration, it's for debug only
|
||||
*
|
||||
* @param cmd : ioctl command type
|
||||
* @param cfg : configuration for the command
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
* - others: failed
|
||||
*/
|
||||
esp_err_t esp_wifi_internal_ioctl(int cmd, wifi_ioctl_config_t *cfg);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -215,6 +215,15 @@ void *wifi_realloc( void *ptr, size_t size );
|
||||
*/
|
||||
void *wifi_calloc( size_t n, size_t size );
|
||||
|
||||
/**
|
||||
* @brief Update WiFi MAC time
|
||||
*
|
||||
* @param uint32_t time_delta : time duration since the WiFi/BT common clock is disabled
|
||||
*
|
||||
* @return Always returns ESP_OK
|
||||
*/
|
||||
typedef esp_err_t (* wifi_mac_time_update_cb_t)( uint32_t time_delta );
|
||||
|
||||
/**
|
||||
* @brief Update WiFi MAC time
|
||||
*
|
||||
|
@ -21,7 +21,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ESP_WIFI_OS_ADAPTER_VERSION 0x00000001
|
||||
#define ESP_WIFI_OS_ADAPTER_VERSION 0x00000002
|
||||
#define ESP_WIFI_OS_ADAPTER_MAGIC 0xDEADBEAF
|
||||
|
||||
#define OSI_FUNCS_TIME_BLOCKING 0xffffffff
|
||||
@ -39,12 +39,9 @@ typedef struct {
|
||||
void (* _spin_lock_delete)(void *lock);
|
||||
uint32_t (*_wifi_int_disable)(void *wifi_int_mux);
|
||||
void (*_wifi_int_restore)(void *wifi_int_mux, uint32_t tmp);
|
||||
void (*_task_yield)(void);
|
||||
void (*_task_yield_from_isr)(void);
|
||||
void *(*_semphr_create)(uint32_t max, uint32_t init);
|
||||
void (*_semphr_delete)(void *semphr);
|
||||
int32_t (*_semphr_take_from_isr)(void *semphr, void *hptw);
|
||||
int32_t (*_semphr_give_from_isr)(void *semphr, void *hptw);
|
||||
int32_t (*_semphr_take)(void *semphr, uint32_t block_time_tick);
|
||||
int32_t (*_semphr_give)(void *semphr);
|
||||
void *(*_mutex_create)(void);
|
||||
@ -59,7 +56,6 @@ typedef struct {
|
||||
int32_t (* _queue_send_to_back)(void *queue, void *item, uint32_t block_time_tick);
|
||||
int32_t (* _queue_send_to_front)(void *queue, void *item, uint32_t block_time_tick);
|
||||
int32_t (* _queue_recv)(void *queue, void *item, uint32_t block_time_tick);
|
||||
int32_t (* _queue_recv_from_isr)(void *queue, void * const item, int32_t * const hptw);
|
||||
uint32_t (* _queue_msg_waiting)(void *queue);
|
||||
void *(* _event_group_create)(void);
|
||||
void (* _event_group_delete)(void *event);
|
||||
@ -73,19 +69,15 @@ typedef struct {
|
||||
int32_t (* _task_ms_to_tick)(uint32_t ms);
|
||||
void *(* _task_get_current_task)(void);
|
||||
int32_t (* _task_get_max_priority)(void);
|
||||
int32_t (* _is_in_isr)(void);
|
||||
void *(* _malloc)(uint32_t size);
|
||||
void (* _free)(void *p);
|
||||
uint32_t (* _get_free_heap_size)(void);
|
||||
uint32_t (* _rand)(void);
|
||||
void (* _dport_access_stall_other_cpu_start_wrap)(void);
|
||||
void (* _dport_access_stall_other_cpu_end_wrap)(void);
|
||||
int32_t (* _phy_rf_init)(const void * init_data, uint32_t mode, void * calibration_data, uint32_t module);
|
||||
int32_t (* _phy_rf_deinit)(uint32_t module);
|
||||
void (* _phy_load_cal_and_init)(uint32_t module);
|
||||
int32_t (* _read_mac)(uint8_t* mac, uint32_t type);
|
||||
void (* _timer_init)(void);
|
||||
void (* _timer_deinit)(void);
|
||||
void (* _timer_arm)(void *timer, uint32_t tmout, bool repeat);
|
||||
void (* _timer_disarm)(void *timer);
|
||||
void (* _timer_done)(void *ptimer);
|
||||
@ -127,6 +119,9 @@ typedef struct {
|
||||
int32_t (* _modem_sleep_deregister)(uint32_t module);
|
||||
void (* _sc_ack_send)(void *param);
|
||||
void (* _sc_ack_send_stop)(void);
|
||||
uint32_t (* _coex_status_get)(void);
|
||||
int32_t (* _coex_wifi_request)(uint32_t event, uint32_t latency, uint32_t duration);
|
||||
int32_t (* _coex_wifi_release)(uint32_t event);
|
||||
int32_t _magic;
|
||||
} wifi_osi_funcs_t;
|
||||
|
||||
|
@ -93,6 +93,7 @@ typedef enum {
|
||||
WIFI_REASON_AUTH_FAIL = 202,
|
||||
WIFI_REASON_ASSOC_FAIL = 203,
|
||||
WIFI_REASON_HANDSHAKE_TIMEOUT = 204,
|
||||
WIFI_REASON_CONNECTION_FAIL = 205,
|
||||
} wifi_err_reason_t;
|
||||
|
||||
typedef enum {
|
||||
@ -491,6 +492,34 @@ typedef enum {
|
||||
WIFI_PHY_RATE_MAX,
|
||||
} wifi_phy_rate_t;
|
||||
|
||||
/**
|
||||
* @brief WiFi ioctl command type
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
WIFI_IOCTL_SET_STA_HT2040_COEX = 1, /**< Set the configuration of STA's HT2040 coexist management */
|
||||
WIFI_IOCTL_GET_STA_HT2040_COEX, /**< Get the configuration of STA's HT2040 coexist management */
|
||||
WIFI_IOCTL_MAX,
|
||||
} wifi_ioctl_cmd_t;
|
||||
|
||||
/**
|
||||
* @brief Configuration for STA's HT2040 coexist management
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
int enable; /**< Indicate whether STA's HT2040 coexist management is enabled or not */
|
||||
} wifi_ht2040_coex_t;
|
||||
|
||||
/**
|
||||
* @brief Configuration for WiFi ioctl
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
union {
|
||||
wifi_ht2040_coex_t ht2040_coex; /**< Configuration of STA's HT2040 coexist management */
|
||||
} data; /**< Configuration of ioctl command */
|
||||
} wifi_ioctl_config_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user