未验证 提交 2452c1fb 编写于 作者: M Me No Dev 提交者: GitHub

IDF release/v3.3 71df1f742

esp-face: master 420fc7e
esp32-camera: master 0107093
上级 5f983707
......@@ -35,7 +35,7 @@ compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.project.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld -T esp32.rom.spiram_incompatible_fns.ld -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u __cxa_guard_dummy -u __cxx_fatal_exception
compiler.c.elf.libs=-lgcc -lespcoredump -lesp_event -lheap -lpe -lmesh -lm -lesp_http_client -lfb_gfx -lface_detection -lesp_adc_cal -ldetection_cat_face -lmbedtls -lunity -lspiffs -lod -lapp_trace -llog -lesp_websocket_client -lexpat -lwpa2 -lxtensa-debug-module -lnet80211 -lhal -lvfs -lwps -lmqtt -lasio -lbt -lwpa_supplicant -lpp -lmdns -llwip -lnvs_flash -lc -lbootloader_support -lnewlib -lsdmmc -lapp_update -lethernet -lefuse -lprotobuf-c -ldetection -lfreemodbus -lcore -lface_recognition -lfd -lcoap -ljsmn -lesp_https_ota -ltcp_transport -lbtdm_app -lesp_ringbuf -ldriver -lwifi_provisioning -llibsodium -lopenssl -lfatfs -lnghttp -lespnow -lprotocomm -lspi_flash -lc_nano -lulp -lesp_http_server -lesp32-camera -lsmartconfig -lsmartconfig_ack -lesp-tls -lcoexist -lmicro-ecc -lesp_https_server -lwpa -ltcpip_adapter -lwear_levelling -lfreertos -lsoc -ljson -lesp32 -lpthread -lcxx -lfr -ldl -lphy -limage_util -lrtc -lconsole -lstdc++
compiler.c.elf.libs=-lgcc -lesp_http_client -lcxx -lwps -lsoc -lesp_event -lc -lprotobuf-c -lunity -lesp_ringbuf -lasio -lnewlib -lfreemodbus -lbtdm_app -ltcpip_adapter -llog -lxtensa-debug-module -lsmartconfig -lspi_flash -lmesh -lwpa -lheap -lbootloader_support -lapp_update -llwip -ldetection_cat_face -lopenssl -ldriver -lesp_https_ota -lfr -lconsole -llibsodium -lmqtt -ljson -lwear_levelling -lface_recognition -lfatfs -lspiffs -ldl -lrtc -ljsmn -lesp_http_server -lfreertos -lespcoredump -lesp_websocket_client -lod -lprotocomm -lwpa2 -lesp_adc_cal -lnghttp -lc_nano -lpp -lpe -lethernet -lbt -ldetection -lulp -lcoap -lfd -lespnow -lmdns -lmicro-ecc -lcore -lmbedtls -lcoexist -lface_detection -lesp32 -ltcp_transport -lphy -lsmartconfig_ack -lhal -lnvs_flash -lfb_gfx -lvfs -lesp32-camera -lm -lsdmmc -lapp_trace -lefuse -lnet80211 -lesp-tls -lwifi_provisioning -lwpa_supplicant -lesp_https_server -limage_util -lpthread -lexpat -lstdc++
compiler.as.cmd=xtensa-esp32-elf-as
......
此差异已折叠。
......@@ -171,7 +171,7 @@ env.Append(
],
LIBS=[
"-lgcc", "-lespcoredump", "-lesp_event", "-lheap", "-lpe", "-lmesh", "-lm", "-lesp_http_client", "-lfb_gfx", "-lface_detection", "-lesp_adc_cal", "-ldetection_cat_face", "-lmbedtls", "-lunity", "-lspiffs", "-lod", "-lapp_trace", "-llog", "-lesp_websocket_client", "-lexpat", "-lwpa2", "-lxtensa-debug-module", "-lnet80211", "-lhal", "-lvfs", "-lwps", "-lmqtt", "-lasio", "-lbt", "-lwpa_supplicant", "-lpp", "-lmdns", "-llwip", "-lnvs_flash", "-lc", "-lbootloader_support", "-lnewlib", "-lsdmmc", "-lapp_update", "-lethernet", "-lefuse", "-lprotobuf-c", "-ldetection", "-lfreemodbus", "-lcore", "-lface_recognition", "-lfd", "-lcoap", "-ljsmn", "-lesp_https_ota", "-ltcp_transport", "-lbtdm_app", "-lesp_ringbuf", "-ldriver", "-lwifi_provisioning", "-llibsodium", "-lopenssl", "-lfatfs", "-lnghttp", "-lespnow", "-lprotocomm", "-lspi_flash", "-lc_nano", "-lulp", "-lesp_http_server", "-lesp32-camera", "-lsmartconfig", "-lsmartconfig_ack", "-lesp-tls", "-lcoexist", "-lmicro-ecc", "-lesp_https_server", "-lwpa", "-ltcpip_adapter", "-lwear_levelling", "-lfreertos", "-lsoc", "-ljson", "-lesp32", "-lpthread", "-lcxx", "-lfr", "-ldl", "-lphy", "-limage_util", "-lrtc", "-lconsole", "-lstdc++"
"-lgcc", "-lesp_http_client", "-lcxx", "-lwps", "-lsoc", "-lesp_event", "-lc", "-lprotobuf-c", "-lunity", "-lesp_ringbuf", "-lasio", "-lnewlib", "-lfreemodbus", "-lbtdm_app", "-ltcpip_adapter", "-llog", "-lxtensa-debug-module", "-lsmartconfig", "-lspi_flash", "-lmesh", "-lwpa", "-lheap", "-lbootloader_support", "-lapp_update", "-llwip", "-ldetection_cat_face", "-lopenssl", "-ldriver", "-lesp_https_ota", "-lfr", "-lconsole", "-llibsodium", "-lmqtt", "-ljson", "-lwear_levelling", "-lface_recognition", "-lfatfs", "-lspiffs", "-ldl", "-lrtc", "-ljsmn", "-lesp_http_server", "-lfreertos", "-lespcoredump", "-lesp_websocket_client", "-lod", "-lprotocomm", "-lwpa2", "-lesp_adc_cal", "-lnghttp", "-lc_nano", "-lpp", "-lpe", "-lethernet", "-lbt", "-ldetection", "-lulp", "-lcoap", "-lfd", "-lespnow", "-lmdns", "-lmicro-ecc", "-lcore", "-lmbedtls", "-lcoexist", "-lface_detection", "-lesp32", "-ltcp_transport", "-lphy", "-lsmartconfig_ack", "-lhal", "-lnvs_flash", "-lfb_gfx", "-lvfs", "-lesp32-camera", "-lm", "-lsdmmc", "-lapp_trace", "-lefuse", "-lnet80211", "-lesp-tls", "-lwifi_provisioning", "-lwpa_supplicant", "-lesp_https_server", "-limage_util", "-lpthread", "-lexpat", "-lstdc++"
],
LIBSOURCE_DIRS=[
......
......@@ -110,7 +110,11 @@ esp_err_t esp_flash_encrypt_region(uint32_t src_addr, size_t data_length);
* is enabled but secure boot is not used. This should protect against
* serial re-flashing of an unauthorised code in absence of secure boot.
*
* @return
* @note To support disabling UART Download Mode on ESP32 V3 only, this function
* doesn't write protect FLASH_CRYPT_CNT but instead sets it to the max value
* (effectively the same result but allows burning the UART_DL_DIS efuse later on,
* as this is otherwise also disabled if FLASH_CRYPT_CNT is write protected.)
*
*/
void esp_flash_write_protect_crypt_cnt();
......
......@@ -454,28 +454,6 @@ esp_err_t esp_bt_sleep_enable(void);
*/
esp_err_t esp_bt_sleep_disable(void);
/**
* @brief to check whether bluetooth controller is sleeping at the instant, if modem sleep is enabled
*
* Note that this function shall not be invoked before esp_bt_controller_enable()
* This function is supposed to be used ORIG mode of modem sleep
*
* @return true if in modem sleep state, false otherwise
*/
bool esp_bt_controller_is_sleeping(void);
/**
* @brief request controller to wakeup from sleeping state during sleep mode
*
* Note that this function shall not be invoked before esp_bt_controller_enable()
* Note that this function is supposed to be used ORIG mode of modem sleep
* Note that after this request, bluetooth controller may again enter sleep as long as the modem sleep is enabled
*
* Profiling shows that it takes several milliseconds to wakeup from modem sleep after this request.
* Generally it takes longer if 32kHz XTAL is used than the main XTAL, due to the lower frequency of the former as the bluetooth low power clock source.
*/
void esp_bt_controller_wakeup_request(void);
/**
* @brief Manually clear scan duplicate list
*
......
......@@ -287,6 +287,8 @@ typedef enum {
ESP_BLE_SM_ONLY_ACCEPT_SPECIFIED_SEC_AUTH,
/* Enable/Disable OOB support */
ESP_BLE_SM_OOB_SUPPORT,
/* Appl encryption key size */
ESP_BLE_APP_ENC_KEY_SIZE,
ESP_BLE_SM_MAX_PARAM,
} esp_ble_sm_param_t;
......@@ -895,7 +897,7 @@ esp_err_t esp_ble_gap_update_conn_params(esp_ble_conn_update_params_t *params);
esp_err_t esp_ble_gap_set_pkt_data_len(esp_bd_addr_t remote_device, uint16_t tx_data_length);
/**
* @brief This function sets the random address for the application
* @brief This function sets the static Random Address and Non-Resolvable Private Address for the application
*
* @param[in] rand_addr: the random address which should be setting
*
......@@ -1243,6 +1245,18 @@ esp_err_t esp_ble_oob_req_reply(esp_bd_addr_t bd_addr, uint8_t *TK, uint8_t len)
*/
esp_err_t esp_ble_gap_disconnect(esp_bd_addr_t remote_device);
/**
* @brief This function is called to authorized a link after Authentication(MITM protection)
*
* @param[in] bd_addr: BD address of the peer device.
* @param[out] authorize: Authorized the link or not.
*
* @return - ESP_OK : success
* - other : failed
*
*/
esp_err_t esp_gap_ble_set_authorization(esp_bd_addr_t bd_addr, bool authorize);
#ifdef __cplusplus
}
#endif
......
......@@ -278,6 +278,8 @@ typedef enum {
#define ESP_GATT_PERM_WRITE_ENC_MITM (1 << 6) /* bit 6 - 0x0040 */ /* relate to BTA_GATT_PERM_WRITE_ENC_MITM in bta/bta_gatt_api.h */
#define ESP_GATT_PERM_WRITE_SIGNED (1 << 7) /* bit 7 - 0x0080 */ /* relate to BTA_GATT_PERM_WRITE_SIGNED in bta/bta_gatt_api.h */
#define ESP_GATT_PERM_WRITE_SIGNED_MITM (1 << 8) /* bit 8 - 0x0100 */ /* relate to BTA_GATT_PERM_WRITE_SIGNED_MITM in bta/bta_gatt_api.h */
#define ESP_GATT_PERM_READ_AUTHORIZATION (1 << 9) /* bit 9 - 0x0200 */
#define ESP_GATT_PERM_WRITE_AUTHORIZATION (1 << 10) /* bit 10 - 0x0400 */
typedef uint16_t esp_gatt_perm_t;
/* relate to BTA_GATT_CHAR_PROP_BIT_xxx in bta/bta_gatt_api.h */
......
......@@ -603,6 +603,29 @@ esp_err_t esp_ble_gattc_read_char (esp_gatt_if_t gattc_if,
uint16_t conn_id,
uint16_t handle,
esp_gatt_auth_req_t auth_req);
/**
* @brief This function is called to read a service's characteristics of
* the given characteristic UUID
*
* @param[in] gattc_if: Gatt client access interface.
* @param[in] conn_id : connection ID.
* @param[in] start_handle : the attribute start handle.
* @param[in] end_handle : the attribute end handle
* @param[in] uuid : The UUID of attribute which will be read.
* @param[in] auth_req : authenticate request type
*
* @return
* - ESP_OK: success
* - other: failed
*
*/
esp_err_t esp_ble_gattc_read_by_type (esp_gatt_if_t gattc_if,
uint16_t conn_id,
uint16_t start_handle,
uint16_t end_handle,
esp_bt_uuid_t *uuid,
esp_gatt_auth_req_t auth_req);
/**
* @brief This function is called to read multiple characteristic or
......
......@@ -27,7 +27,10 @@ typedef enum {
ESP_SPP_FAILURE, /*!< Generic failure. */
ESP_SPP_BUSY, /*!< Temporarily can not handle this request. */
ESP_SPP_NO_DATA, /*!< no data. */
ESP_SPP_NO_RESOURCE /*!< No more set pm control block */
ESP_SPP_NO_RESOURCE, /*!< No more resource */
ESP_SPP_NEED_INIT, /*!< SPP module shall init first */
ESP_SPP_NEED_DEINIT, /*!< SPP module shall deinit first */
ESP_SPP_NO_CONNECTION, /*!< connection may have been closed */
} esp_spp_status_t;
/* Security Setting Mask, Suggest to use ESP_SPP_SEC_NONE, ESP_SPP_SEC_AUTHORIZE or ESP_SPP_SEC_AUTHENTICATE only.*/
......
......@@ -395,5 +395,5 @@
#define CONFIG_BTDM_MODEM_SLEEP_MODE_ORIG 1
#define CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_ERROR 1
#define CONFIG_FATFS_API_ENCODING_ANSI_OEM 1
#define CONFIG_ARDUINO_IDF_COMMIT "b4c075169"
#define CONFIG_ARDUINO_IDF_COMMIT "71df1f742"
#define CONFIG_ARDUINO_IDF_BRANCH "release/v3.3"
......@@ -228,14 +228,32 @@ int adc1_get_voltage(adc1_channel_t channel) __attribute__((deprecated));
/**
* @brief Enable ADC power
* @deprecated Use adc_power_acquire and adc_power_release instead.
*/
void adc_power_on();
void adc_power_on(void) __attribute__((deprecated));
/**
* @brief Power off SAR ADC
* This function will force power down for ADC
* @deprecated Use adc_power_acquire and adc_power_release instead.
* This function will force power down for ADC.
* This function is deprecated because forcing power ADC power off may
* disrupt operation of other components which may be using the ADC.
*/
void adc_power_off();
void adc_power_off(void) __attribute__((deprecated));
/**
* @brief Increment the usage counter for ADC module.
* ADC will stay powered on while the counter is greater than 0.
* Call adc_power_release when done using the ADC.
*/
void adc_power_acquire(void);
/**
* @brief Decrement the usage counter for ADC module.
* ADC will stay powered on while the counter is greater than 0.
* Call this function when done using the ADC.
*/
void adc_power_release(void);
/**
* @brief Initialize ADC pad
......
......@@ -37,7 +37,8 @@ extern "C" {
#define CAN_GENERAL_CONFIG_DEFAULT(tx_io_num, rx_io_num, op_mode) {.mode = op_mode, .tx_io = tx_io_num, .rx_io = rx_io_num, \
.clkout_io = CAN_IO_UNUSED, .bus_off_io = CAN_IO_UNUSED, \
.tx_queue_len = 5, .rx_queue_len = 5, \
.alerts_enabled = CAN_ALERT_NONE, .clkout_divider = 0, }
.alerts_enabled = CAN_ALERT_NONE, .clkout_divider = 0, \
.intr_flags = ESP_INTR_FLAG_LEVEL1}
/**
* @brief Initializer macros for timing configuration structure
......@@ -91,7 +92,7 @@ extern "C" {
#define CAN_ALERT_BUS_OFF 0x1000 /**< Alert(4096): Bus-off condition occurred. CAN controller can no longer influence bus */
#define CAN_ALERT_ALL 0x1FFF /**< Bit mask to enable all alerts during configuration */
#define CAN_ALERT_NONE 0x0000 /**< Bit mask to disable all alerts during configuration */
#define CAN_ALERT_AND_LOG 0x2000 /**< Bit mask to enable alerts to also be logged when they occur */
#define CAN_ALERT_AND_LOG 0x2000 /**< Bit mask to enable alerts to also be logged when they occur. Note that logging from the ISR is disabled if CONFIG_TWAI_ISR_IN_IRAM is enabled. */
/**
* @brief Message flags
......@@ -151,6 +152,7 @@ typedef struct {
uint32_t rx_queue_len; /**< Number of messages RX queue can hold */
uint32_t alerts_enabled; /**< Bit field of alerts to enable (see documentation) */
uint32_t clkout_divider; /**< CLKOUT divider. Can be 1 or any even number from 2 to 14 (optional, set to 0 if unused) */
int intr_flags; /**< Interrupt flags to set the priority of the driver's ISR. Note that to use the ESP_INTR_FLAG_IRAM, the CONFIG_CAN_ISR_IN_IRAM option should be enabled first. */
} can_general_config_t;
/**
......
......@@ -276,9 +276,11 @@ esp_err_t gpio_set_intr_type(gpio_num_t gpio_num, gpio_int_type_t intr_type);
/**
* @brief Enable GPIO module interrupt signal
*
* @note Please do not use the interrupt of GPIO36 and GPIO39 when using ADC.
* @note Please do not use the interrupt of GPIO36 and GPIO39 when using ADC or Wi-Fi with sleep mode enabled.
* Please refer to the comments of `adc1_get_raw`.
* Please refer to section 3.11 of 'ECO_and_Workarounds_for_Bugs_in_ESP32' for the description of this issue.
* As a workaround, call adc_power_acquire() in the app. This will result in higher power consumption (by ~1mA),
* but will remove the glitches on GPIO36 and GPIO39.
*
* @param gpio_num GPIO number. If you want to enable an interrupt on e.g. GPIO16, gpio_num should be GPIO_NUM_16 (16);
*
......
......@@ -301,6 +301,23 @@ void esp_efuse_disable_basic_rom_console(void);
*/
esp_err_t esp_efuse_apply_34_encoding(const uint8_t *in_bytes, uint32_t *out_words, size_t in_bytes_len);
/* @brief Disable ROM Download Mode via eFuse
*
* Permanently disables the ROM Download Mode feature. Once disabled, if the SoC is booted with
* strapping pins set for ROM Download Mode then an error is printed instead.
*
* @note Not all SoCs support this option. An error will be returned if called on an ESP32
* with a silicon revision lower than 3, as these revisions do not support this option.
*
* @note If ROM Download Mode is already disabled, this function does nothing and returns success.
*
* @return
* - ESP_OK If the eFuse was successfully burned, or had already been burned.
* - ESP_ERR_NOT_SUPPORTED (ESP32 only) This SoC is not capable of disabling UART download mode
* - ESP_ERR_INVALID_STATE (ESP32 only) This eFuse is write protected and cannot be written
*/
esp_err_t esp_efuse_disable_rom_download_mode(void);
/* @brief Write random data to efuse key block write registers
*
* @note Caller is responsible for ensuring efuse
......
......@@ -17,7 +17,7 @@ extern "C" {
#endif
// md5_digest_table 2e23344575b3d07f01ecb695294e9770
// md5_digest_table 11b691b6fa8546a3862a7a876be5f758
// This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY.
// If you want to change some fields, you need to change esp_efuse_table.csv file
// then run `efuse_common_table` or `efuse_custom_table` command it will generate this file.
......@@ -36,9 +36,10 @@ extern const esp_efuse_desc_t* ESP_EFUSE_ENCRYPT_CONFIG[];
extern const esp_efuse_desc_t* ESP_EFUSE_DISABLE_DL_ENCRYPT[];
extern const esp_efuse_desc_t* ESP_EFUSE_DISABLE_DL_DECRYPT[];
extern const esp_efuse_desc_t* ESP_EFUSE_DISABLE_DL_CACHE[];
extern const esp_efuse_desc_t* ESP_EFUSE_FLASH_CRYPT_CNT[];
extern const esp_efuse_desc_t* ESP_EFUSE_DISABLE_JTAG[];
extern const esp_efuse_desc_t* ESP_EFUSE_CONSOLE_DEBUG_DISABLE[];
extern const esp_efuse_desc_t* ESP_EFUSE_FLASH_CRYPT_CNT[];
extern const esp_efuse_desc_t* ESP_EFUSE_UART_DOWNLOAD_DIS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_FLASH_CRYPT_CNT[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_BLK1[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_BLK2[];
......
......@@ -135,6 +135,8 @@ typedef struct esp_tls {
fd_set rset; /*!< read file descriptors */
fd_set wset; /*!< write file descriptors */
bool is_tls; /*!< indicates connection type (TLS or NON-TLS) */
} esp_tls_t;
/**
......
......@@ -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
......
......@@ -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
* @return : 0 - success, other - failed
* @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
*/
int coex_bt_release(uint32_t event);
void coex_schm_status_bit_set(uint32_t type, uint32_t status);
/**
* @brief Register callback function for blue tooth.
* @brief Set coexistence scheme interval.
*
* @param cb : callback function
* @param interval : Coexistence scheme interval
* @return : 0 - success, other - failed
*/
int coex_register_bt_cb(coex_func_cb_t cb);
int coex_schm_interval_set(uint32_t interval);
/**
* @brief Get coexistence scheme interval.
*
* @return : Coexistence scheme interval
*/
uint32_t coex_schm_interval_get(void);
/**
* @brief Lock before reset base band.
* @brief Get current coexistence scheme period.
*
* @return : lock value
* @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
*/
uint32_t coex_bb_reset_lock(void);
int coex_schm_curr_phase_idx_set(int idx);
/**
* @brief Unlock after reset base band.
* @brief Get current coexistence scheme phase index.
*
* @param restore : lock value
* @return : Coexistence scheme phase index
*/
void coex_bb_reset_unlock(uint32_t restore);
int coex_schm_curr_phase_idx_get(void);
/**
* @brief Register coexistence adapter functions.
......
......@@ -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 */
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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*/
......
......@@ -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;
......
......@@ -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
......
......@@ -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
*
*/
......
......@@ -108,6 +108,7 @@ typedef struct {
const char *cert_pem; /*!< SSL server certification, PEM format as string, if the client requires to verify server */
const char *client_cert_pem; /*!< SSL client certification, PEM format as string, if the server requires to verify client */
const char *client_key_pem; /*!< SSL client key, PEM format as string, if the server requires to verify client */
const char *user_agent; /*!< The User Agent string to send with HTTP requests */
esp_http_client_method_t method; /*!< HTTP Method */
int timeout_ms; /*!< Network timeout in milliseconds */
bool disable_auto_redirect; /*!< Disable HTTP automatic redirects */
......@@ -125,7 +126,11 @@ typedef struct {
* Enum for the HTTP status codes.
*/
typedef enum {
/* 2xx - Success */
HttpStatus_Ok = 200,
/* 3xx - Redirection */
HttpStatus_MultipleChoices = 300,
HttpStatus_MovedPermanently = 301,
HttpStatus_Found = 302,
......
......@@ -778,6 +778,11 @@ u32_t lwip_hook_tcp_isn(const struct ip_addr *local_ip, u16_t local_port,
*/
#define TCPIP_DEBUG LWIP_DBG_OFF
/**
* TCP_OOSEQ_DEBUG: Enable debugging in tcpin.c for OOSEQ.
*/
#define TCP_OOSEQ_DEBUG LWIP_DBG_OFF
/**
* ETHARP_TRUST_IP_MAC==1: Incoming IP packets cause the ARP table to be
* updated with the source MAC and IP addresses supplied in the packet.
......
......@@ -88,30 +88,37 @@ esp_err_t nvs_flash_deinit_partition(const char* partition_label);
/**
* @brief Erase the default NVS partition
*
* This function erases all contents of the default NVS partition (one with label "nvs")
* Erases all contents of the default NVS partition (one with label "nvs").
*
* @note If the partition is initialized, this function first de-initializes it. Afterwards, the partition has to
* be initialized again to be used.
*
* @return
* - ESP_OK on success
* - ESP_ERR_NOT_FOUND if there is no NVS partition labeled "nvs" in the
* partition table
* - different error in case de-initialization fails (shouldn't happen)
*/
esp_err_t nvs_flash_erase(void);
/**
* @brief Erase specified NVS partition
*
* This function erases all contents of specified NVS partition
* Erase all content of a specified NVS partition
*
* @note If the partition is initialized, this function first de-initializes it. Afterwards, the partition has to
* be initialized again to be used.
*
* @param[in] part_name Name (label) of the partition to be erased
* @param[in] part_name Name (label) of the partition which should be erased
*
* @return
* - ESP_OK on success
* - ESP_ERR_NOT_FOUND if there is no NVS partition with the specified name
* in the partition table
* - different error in case de-initialization fails (shouldn't happen)
*/
esp_err_t nvs_flash_erase_partition(const char *part_name);
/**
* @brief Initialize the default NVS partition.
*
......
......@@ -147,8 +147,8 @@ typedef struct {
typedef union {
struct {
uint32_t rx_message_counter: 5; /* RMC[4:0] RX Message Counter */
uint32_t reserved27: 27; /* Internal Reserved */
uint32_t rx_message_counter: 7; /* RMC[6:0] RX Message Counter */
uint32_t reserved25: 25; /* Internal Reserved */
};
uint32_t val;
} can_rx_msg_cnt_reg_t;
......
......@@ -1024,13 +1024,14 @@ struct wps_sm {
u8 identity_len;
u8 ownaddr[ETH_ALEN];
u8 bssid[ETH_ALEN];
u8 ssid[32];
u8 ssid_len;
u8 ssid[MAX_WPS_AP_CRED][MAX_SSID_LEN];
u8 ssid_len[MAX_WPS_AP_CRED];
char key[MAX_WPS_AP_CRED][MAX_PASSPHRASE_LEN];
u8 key_len[MAX_WPS_AP_CRED];
u8 ap_cred_cnt;
struct wps_device_data *dev;
u8 uuid[16];
u8 eapol_version;
char key[64];
u8 key_len;
ETSTimer wps_timeout_timer;
ETSTimer wps_msg_timeout_timer;
ETSTimer wps_scan_timer;
......@@ -1054,8 +1055,8 @@ struct wps_sm {
#define IEEE80211_CAPINFO_PRIVACY 0x0010
struct wps_sm *wps_sm_get(void);
int wps_ssid_save(u8 *ssid, u8 ssid_len);
int wps_key_save(char *key, u8 key_len);
int wps_ssid_save(u8 *ssid, u8 ssid_len, u8 idx);
int wps_key_save(char *key, u8 key_len, u8 idx);
int wps_station_wps_register_cb(wps_st_cb_t cb);
int wps_station_wps_unregister_cb(void);
int wps_start_pending(void);
......
此差异已折叠。
......@@ -724,6 +724,7 @@ PROVIDE ( r_ld_acl_sniff = 0x4003617c );
PROVIDE ( r_ld_acl_sniff_trans = 0x400360a8 );
PROVIDE ( r_ld_acl_ssr_set = 0x40036274 );
PROVIDE ( r_ld_acl_start = 0x40034ddc );
PROVIDE ( ld_acl_sco_rsvd_check = 0x4002fa94 );
PROVIDE ( r_ld_acl_stop = 0x4003532c );
PROVIDE ( r_ld_acl_test_mode_set = 0x40036f24 );
PROVIDE ( r_ld_acl_timing_accuracy_set = 0x4003673c );
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册