mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-01 13:00:59 +02:00
IDF release/v3.3 (#3672)
ESP-IDF release/v3.3: 66d3783c8 esp-face: 420fc7e esp32-camera: 0107093
This commit is contained in:
@ -32,6 +32,22 @@ typedef enum {
|
||||
ESP_COEX_PREFER_NUM, /*!< Prefer value numbers */
|
||||
} esp_coex_prefer_t;
|
||||
|
||||
/**
|
||||
* @brief coex status type
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_COEX_ST_TYPE_WIFI = 0,
|
||||
ESP_COEX_ST_TYPE_BLE,
|
||||
ESP_COEX_ST_TYPE_BT,
|
||||
} esp_coex_status_type_t;
|
||||
|
||||
#define ESP_COEX_BLE_ST_MESH_CONFIG 0x08
|
||||
#define ESP_COEX_BLE_ST_MESH_TRAFFIC 0x10
|
||||
#define ESP_COEX_BLE_ST_MESH_STANDBY 0x20
|
||||
|
||||
#define ESP_COEX_BT_ST_A2DP_STREAMING 0x10
|
||||
#define ESP_COEX_BT_ST_A2DP_PAUSED 0x20
|
||||
|
||||
/**
|
||||
* @brief Get software coexist version string
|
||||
*
|
||||
@ -40,7 +56,8 @@ typedef enum {
|
||||
const char *esp_coex_version_get(void);
|
||||
|
||||
/**
|
||||
* @brief Set coexist preference of performance
|
||||
* @deprecated Use esp_coex_status_bit_set() and esp_coex_status_bit_clear() instead.
|
||||
* Set coexist preference of performance
|
||||
* For example, if prefer to bluetooth, then it will make A2DP(play audio via classic bt)
|
||||
* more smooth while wifi is runnning something.
|
||||
* If prefer to wifi, it will do similar things as prefer to bluetooth.
|
||||
@ -51,6 +68,37 @@ const char *esp_coex_version_get(void);
|
||||
*/
|
||||
esp_err_t esp_coex_preference_set(esp_coex_prefer_t prefer);
|
||||
|
||||
/**
|
||||
* @brief Set coex schm status
|
||||
* @param type : WIFI/BLE/BT
|
||||
* @param status : WIFI/BLE/BT STATUS
|
||||
* @return : ESP_OK - success, other - failed
|
||||
*/
|
||||
esp_err_t esp_coex_status_bit_set(esp_coex_status_type_t type, uint32_t status);
|
||||
|
||||
/**
|
||||
* @brief Clear coex schm status
|
||||
* @param type : WIFI/BLE/BT
|
||||
* @param status : WIFI/BLE/BT STATUS
|
||||
* @return : ESP_OK - success, other - failed
|
||||
*/
|
||||
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
|
||||
|
62
tools/sdk/include/esp32/esp_idf_version.h
Normal file
62
tools/sdk/include/esp32/esp_idf_version.h
Normal file
@ -0,0 +1,62 @@
|
||||
// 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.
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Major version number (X.x.x) */
|
||||
#define ESP_IDF_VERSION_MAJOR 3
|
||||
/** Minor version number (x.X.x) */
|
||||
#define ESP_IDF_VERSION_MINOR 3
|
||||
/** Patch version number (x.x.X) */
|
||||
#define ESP_IDF_VERSION_PATCH 4
|
||||
|
||||
/**
|
||||
* Macro to convert IDF version number into an integer
|
||||
*
|
||||
* To be used in comparisons, such as ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0)
|
||||
*/
|
||||
#define ESP_IDF_VERSION_VAL(major, minor, patch) ((major << 16) | (minor << 8) | (patch))
|
||||
|
||||
/**
|
||||
* Current IDF version, as an integer
|
||||
*
|
||||
* To be used in comparisons, such as ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0)
|
||||
*/
|
||||
#define ESP_IDF_VERSION ESP_IDF_VERSION_VAL(ESP_IDF_VERSION_MAJOR, \
|
||||
ESP_IDF_VERSION_MINOR, \
|
||||
ESP_IDF_VERSION_PATCH)
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
/**
|
||||
* Return full IDF version string, same as 'git describe' output.
|
||||
*
|
||||
* @note If you are printing the ESP-IDF version in a log file or other information,
|
||||
* this function provides more information than using the numerical version macros.
|
||||
* For example, numerical version macros don't differentiate between development,
|
||||
* pre-release and release versions, but the output of this function does.
|
||||
*
|
||||
* @return constant string from IDF_VER
|
||||
*/
|
||||
const char* esp_get_idf_version(void);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -124,6 +124,9 @@ extern "C" {
|
||||
#define ESP_ERR_MESH_DISCARD_DUPLICATE (ESP_ERR_MESH_BASE + 20) /**< discard the packet due to the duplicate sequence number */
|
||||
#define ESP_ERR_MESH_DISCARD (ESP_ERR_MESH_BASE + 21) /**< discard the packet */
|
||||
#define ESP_ERR_MESH_VOTING (ESP_ERR_MESH_BASE + 22) /**< vote in progress */
|
||||
#define ESP_ERR_MESH_XMIT (ESP_ERR_MESH_BASE + 23) /**< XMIT */
|
||||
#define ESP_ERR_MESH_QUEUE_READ (ESP_ERR_MESH_BASE + 24) /**< error in reading queue */
|
||||
#define ESP_ERR_MESH_RECV_RELEASE (ESP_ERR_MESH_BASE + 26) /**< release esp_mesh_recv_toDS */
|
||||
|
||||
/**
|
||||
* @brief Flags bitmap for esp_mesh_send() and esp_mesh_recv()
|
||||
@ -203,6 +206,7 @@ typedef enum {
|
||||
MESH_ROOT, /**< the only sink of the mesh network. Has the ability to access external IP network */
|
||||
MESH_NODE, /**< intermediate device. Has the ability to forward packets over the mesh network */
|
||||
MESH_LEAF, /**< has no forwarding ability */
|
||||
MESH_STA, /**< connect to router with a standlone Wi-Fi station mode, no network expansion capability */
|
||||
} mesh_type_t;
|
||||
|
||||
/**
|
||||
@ -735,6 +739,7 @@ esp_err_t esp_mesh_recv(mesh_addr_t *from, mesh_data_t *data, int timeout_ms,
|
||||
* - ESP_ERR_MESH_NOT_START
|
||||
* - ESP_ERR_MESH_TIMEOUT
|
||||
* - ESP_ERR_MESH_DISCARD
|
||||
* - ESP_ERR_MESH_RECV_RELEASE
|
||||
*/
|
||||
esp_err_t esp_mesh_recv_toDS(mesh_addr_t *from, mesh_addr_t *to,
|
||||
mesh_data_t *data, int timeout_ms, int *flag, mesh_opt_t opt[],
|
||||
@ -830,8 +835,10 @@ esp_err_t esp_mesh_get_id(mesh_addr_t *id);
|
||||
|
||||
/**
|
||||
* @brief Designate device type over the mesh network
|
||||
* - MESH_IDLE: designates a device as a self-organized node for a mesh network
|
||||
* - MESH_ROOT: designates the root node for a mesh network
|
||||
* - MESH_LEAF: designates a device as a standalone Wi-Fi station
|
||||
* - MESH_LEAF: designates a device as a standalone Wi-Fi station that connects to a parent
|
||||
* - MESH_STA: designates a device as a standalone Wi-Fi station that connects to a router
|
||||
*
|
||||
* @param[in] type device type
|
||||
*
|
||||
|
@ -202,6 +202,18 @@ esp_err_t esp_phy_rf_deinit(phy_rf_module_t module);
|
||||
*/
|
||||
void esp_phy_load_cal_and_init(phy_rf_module_t module);
|
||||
|
||||
/**
|
||||
* @brief Enable WiFi/BT common clock
|
||||
*
|
||||
*/
|
||||
void esp_phy_common_clock_enable(void);
|
||||
|
||||
/**
|
||||
* @brief Disable WiFi/BT common clock
|
||||
*
|
||||
*/
|
||||
void esp_phy_common_clock_disable(void);
|
||||
|
||||
/**
|
||||
* @brief Module requires to enter modem sleep
|
||||
*/
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <stdbool.h>
|
||||
#include "esp_err.h"
|
||||
#include "esp_sleep.h"
|
||||
#include "esp_idf_version.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -129,6 +130,16 @@ uint32_t system_get_time(void) __attribute__ ((deprecated));
|
||||
*/
|
||||
uint32_t esp_get_free_heap_size(void);
|
||||
|
||||
/**
|
||||
* @brief Get the size of available internal heap.
|
||||
*
|
||||
* Note that the returned value may be larger than the maximum contiguous block
|
||||
* which can be allocated.
|
||||
*
|
||||
* @return Available internal heap size, in bytes.
|
||||
*/
|
||||
uint32_t esp_get_free_internal_heap_size(void);
|
||||
|
||||
/** @cond */
|
||||
/**
|
||||
* @brief Get the size of available heap.
|
||||
@ -292,14 +303,6 @@ esp_err_t esp_derive_local_mac(uint8_t* local_mac, const uint8_t* universal_mac)
|
||||
const char* system_get_sdk_version(void) __attribute__ ((deprecated));
|
||||
/** @endcond */
|
||||
|
||||
/**
|
||||
* Get IDF version
|
||||
*
|
||||
* @return constant string from IDF_VER
|
||||
*/
|
||||
const char* esp_get_idf_version(void);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Chip models
|
||||
*/
|
||||
@ -329,6 +332,15 @@ typedef struct {
|
||||
*/
|
||||
void esp_chip_info(esp_chip_info_t* out_info);
|
||||
|
||||
/**
|
||||
* @brief Cache lock bug exists or not
|
||||
*
|
||||
* @return
|
||||
* - true : bug exists
|
||||
* - false : bug not exists
|
||||
*/
|
||||
bool soc_has_cache_lock_bug(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -542,8 +542,10 @@ esp_err_t esp_wifi_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw);
|
||||
/**
|
||||
* @brief Set primary/secondary channel of ESP32
|
||||
*
|
||||
* @attention 1. This is a special API for sniffer
|
||||
* @attention 2. This API should be called after esp_wifi_start() and esp_wifi_set_promiscuous()
|
||||
* @attention 1. This API should be called after esp_wifi_start()
|
||||
* @attention 2. When ESP32 is in STA mode, this API should not be called when STA is scanning or connecting to an external AP
|
||||
* @attention 3. When ESP32 is in softAP mode, this API should not be called when softAP has connected to external STAs
|
||||
* @attention 4. When ESP32 is in STA+softAP mode, this API should not be called when in the scenarios described above
|
||||
*
|
||||
* @param primary for HT20, primary is the channel number, for HT40, primary is the primary channel
|
||||
* @param second for HT20, second is ignored, for HT40, second is the second channel
|
||||
@ -798,6 +800,21 @@ esp_err_t esp_wifi_get_config(wifi_interface_t interface, wifi_config_t *conf);
|
||||
*/
|
||||
esp_err_t esp_wifi_ap_get_sta_list(wifi_sta_list_t *sta);
|
||||
|
||||
/**
|
||||
* @brief Get AID of STA connected with soft-AP
|
||||
*
|
||||
* @param mac STA's mac address
|
||||
* @param[out] aid Store the AID corresponding to STA mac
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
||||
* - ESP_ERR_INVALID_ARG: invalid argument
|
||||
* - ESP_ERR_NOT_FOUND: Requested resource not found
|
||||
* - ESP_ERR_WIFI_MODE: WiFi mode is wrong
|
||||
* - ESP_ERR_WIFI_CONN: WiFi internal error, the station/soft-AP control block is invalid
|
||||
*/
|
||||
esp_err_t esp_wifi_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid);
|
||||
|
||||
/**
|
||||
* @brief Set the WiFi API configuration storage type
|
||||
@ -880,28 +897,59 @@ esp_err_t esp_wifi_set_vendor_ie(bool enable, wifi_vendor_ie_type_t type, wifi_v
|
||||
esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx);
|
||||
|
||||
/**
|
||||
* @brief Set maximum WiFi transmitting power
|
||||
* @brief Set maximum transmitting power after WiFi start.
|
||||
*
|
||||
* @param power Maximum WiFi transmitting power, unit is 0.25dBm, range is [40, 82] corresponding to 10dBm - 20.5dBm here.
|
||||
* @attention 1. Maximum power before wifi startup is limited by PHY init data bin.
|
||||
* @attention 2. The value set by this API will be mapped to the max_tx_power of the structure wifi_country_t variable.
|
||||
* @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 |
|
||||
* +------------+--------------+
|
||||
* @param power Maximum WiFi transmitting power.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
||||
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
|
||||
* - ESP_ERR_WIFI_NOT_ARG: invalid argument
|
||||
* - ESP_ERR_WIFI_ARG: invalid argument, e.g. parameter is out of range
|
||||
*/
|
||||
esp_err_t esp_wifi_set_max_tx_power(int8_t power);
|
||||
|
||||
/**
|
||||
* @brief Get maximum WiFi transmiting power
|
||||
* @brief Get maximum transmiting power after WiFi start
|
||||
*
|
||||
* @param power Maximum WiFi transmitting power, unit is 0.25dBm.
|
||||
* @param power Maximum WiFi transmitting power, unit is 0.25dBm.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
||||
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
|
||||
* - ESP_ERR_INVALID_ARG: invalid argument
|
||||
* - ESP_ERR_WIFI_ARG: invalid argument
|
||||
*/
|
||||
esp_err_t esp_wifi_get_max_tx_power(int8_t *power);
|
||||
|
||||
@ -1063,6 +1111,39 @@ 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 Set the inactive time of the ESP32 STA or AP
|
||||
*
|
||||
* @attention 1. For Station, If the station does not receive a beacon frame from the connected SoftAP during the inactive time,
|
||||
* disconnect from SoftAP. Default 6s.
|
||||
* @attention 2. For SoftAP, If the softAP doesn't receive any data from the connected STA during inactive time,
|
||||
* the softAP will force deauth the STA. Default is 300s.
|
||||
* @attention 3. The inactive time configuration is not stored into flash
|
||||
*
|
||||
* @param ifx interface to be configured.
|
||||
* @param sec Inactive time. Unit seconds.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
||||
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
|
||||
* - ESP_ERR_WIFI_ARG: invalid argument, For Station, if sec is less than 3. For SoftAP, if sec is less than 10.
|
||||
*/
|
||||
esp_err_t esp_wifi_set_inactive_time(wifi_interface_t ifx, uint16_t sec);
|
||||
|
||||
/**
|
||||
* @brief Get inactive time of specified interface
|
||||
*
|
||||
* @param ifx Interface to be configured.
|
||||
* @param sec Inactive time. Unit seconds.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
||||
* - ESP_ERR_WIFI_ARG: invalid argument
|
||||
*/
|
||||
esp_err_t esp_wifi_get_inactive_time(wifi_interface_t ifx, uint16_t *sec);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -318,6 +318,43 @@ esp_err_t esp_wifi_internal_set_log_mod(wifi_log_module_t module, uint32_t submo
|
||||
*/
|
||||
esp_err_t esp_wifi_internal_get_log(wifi_log_level_t *log_level, uint32_t *log_mod);
|
||||
|
||||
/**
|
||||
* @brief Get the user-configured channel info
|
||||
*
|
||||
* @param ifx : WiFi interface
|
||||
* @param primary : store the configured primary channel
|
||||
* @param second : store the configured second channel
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
*/
|
||||
esp_err_t esp_wifi_internal_get_config_channel(wifi_interface_t ifx, uint8_t *primary, uint8_t *second);
|
||||
|
||||
/**
|
||||
* @brief Get the negotiated channel info after WiFi connection established
|
||||
*
|
||||
* @param ifx : WiFi interface
|
||||
* @param aid : the connection number when a STA connects to the softAP
|
||||
* @param primary : store the negotiated primary channel
|
||||
* @param second : store the negotiated second channel
|
||||
* @attention the aid param is only works when the ESP32 in softAP/softAP+STA mode
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
*/
|
||||
esp_err_t esp_wifi_internal_get_negotiated_channel(wifi_interface_t ifx, uint8_t aid, uint8_t *primary, uint8_t *second);
|
||||
|
||||
/**
|
||||
* @brief Get the negotiated bandwidth info after WiFi connection established
|
||||
*
|
||||
* @param ifx : WiFi interface
|
||||
* @param bw : store the negotiated bandwidth
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
*/
|
||||
esp_err_t esp_wifi_internal_get_negotiated_bandwidth(wifi_interface_t ifx, uint8_t aid, uint8_t *bw);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -78,6 +78,8 @@ typedef struct {
|
||||
void (* _dport_access_stall_other_cpu_end_wrap)(void);
|
||||
int32_t (* _phy_rf_deinit)(uint32_t module);
|
||||
void (* _phy_load_cal_and_init)(uint32_t module);
|
||||
void (* _phy_common_clock_enable)(void);
|
||||
void (* _phy_common_clock_disable)(void);
|
||||
int32_t (* _read_mac)(uint8_t* mac, uint32_t type);
|
||||
void (* _timer_arm)(void *timer, uint32_t tmout, bool repeat);
|
||||
void (* _timer_disarm)(void *timer);
|
||||
@ -103,6 +105,7 @@ typedef struct {
|
||||
int32_t (* _get_time)(void *t);
|
||||
unsigned long (* _random)(void);
|
||||
void (* _log_write)(uint32_t level, const char* tag, const char* format, ...);
|
||||
void (* _log_writev)(uint32_t level, const char* tag, const char* format, va_list args);
|
||||
uint32_t (* _log_timestamp)(void);
|
||||
void * (* _malloc_internal)(size_t size);
|
||||
void * (* _realloc_internal)(void *ptr, size_t size);
|
||||
|
@ -93,6 +93,7 @@ typedef enum {
|
||||
WIFI_REASON_ASSOC_FAIL = 203,
|
||||
WIFI_REASON_HANDSHAKE_TIMEOUT = 204,
|
||||
WIFI_REASON_CONNECTION_FAIL = 205,
|
||||
WIFI_REASON_AP_TSF_RESET = 206,
|
||||
} wifi_err_reason_t;
|
||||
|
||||
typedef enum {
|
||||
@ -114,7 +115,7 @@ typedef struct {
|
||||
} wifi_active_scan_time_t;
|
||||
|
||||
/** @brief Aggregate of active & passive scan time per channel */
|
||||
typedef union {
|
||||
typedef struct {
|
||||
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. */
|
||||
@ -214,7 +215,7 @@ typedef struct {
|
||||
uint8_t channel; /**< Channel of ESP32 soft-AP */
|
||||
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 4 */
|
||||
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 */
|
||||
} wifi_ap_config_t;
|
||||
|
||||
|
@ -74,14 +74,21 @@ typedef struct {
|
||||
wps_factory_information_t factory_info;
|
||||
} esp_wps_config_t;
|
||||
|
||||
/* C & C++ compilers have different rules about C99-style named initializers */
|
||||
#ifdef __cplusplus
|
||||
#define WPS_AGG(X) { X }
|
||||
#else
|
||||
#define WPS_AGG(X) X
|
||||
#endif
|
||||
|
||||
#define WPS_CONFIG_INIT_DEFAULT(type) { \
|
||||
.wps_type = type, \
|
||||
.crypto_funcs = &g_wifi_default_wps_crypto_funcs, \
|
||||
.factory_info = { \
|
||||
.manufacturer = "ESPRESSIF", \
|
||||
.model_number = "ESP32", \
|
||||
.model_name = "ESPRESSIF IOT", \
|
||||
.device_name = "ESP STATION", \
|
||||
WPS_AGG( .manufacturer = "ESPRESSIF" ), \
|
||||
WPS_AGG( .model_number = "ESP32" ), \
|
||||
WPS_AGG( .model_name = "ESPRESSIF IOT" ), \
|
||||
WPS_AGG( .device_name = "ESP STATION" ), \
|
||||
} \
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@
|
||||
* if all sets affected by cainst,
|
||||
* or 1 if only one set (or not all sets) of the cache
|
||||
* is affected by cainst (eg. DIWB or DIWBI [not yet ISA defined]).
|
||||
* aa, ab unique address registers (temporaries).
|
||||
* aa, ab unique address registers (temporaries).
|
||||
* awb set to other than a0 if wb type of instruction
|
||||
* loopokay 1 allows use of zero-overhead loops, 0 does not
|
||||
* immrange range (max value) of cainst's immediate offset parameter, in bytes
|
||||
@ -904,7 +904,7 @@
|
||||
movi \aa, XCHAL_DCACHE_WAYS
|
||||
.Ldcgw:
|
||||
#else
|
||||
// All ways are always enabled
|
||||
// All ways are always enabled
|
||||
movi \aa, XCHAL_DCACHE_WAYS
|
||||
#endif
|
||||
#else
|
||||
|
@ -558,7 +558,7 @@
|
||||
* macro implements version of beqi for arbitrary 32-bit immediate value
|
||||
*
|
||||
* beqi32 ax, ay, imm32, label
|
||||
*
|
||||
*
|
||||
* Compares value in register ax with imm32 value and jumps to label if
|
||||
* equal. Clobbers register ay if needed
|
||||
*
|
||||
@ -573,7 +573,7 @@
|
||||
.ifeq (\imm) // 0 ?
|
||||
beqz \ax, \label
|
||||
.else
|
||||
// We could also handle immediates 10,12,16,32,64,128,256
|
||||
// We could also handle immediates 10,12,16,32,64,128,256
|
||||
// but it would be a long macro...
|
||||
movi \ay, \imm
|
||||
beq \ax, \ay, \label
|
||||
@ -639,9 +639,9 @@
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* addx2
|
||||
*
|
||||
*
|
||||
* implements addx2 on machines that do not have it configured
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#if !XCHAL_HAVE_ADDX
|
||||
@ -666,7 +666,7 @@
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* addx4
|
||||
*
|
||||
*
|
||||
* implements addx4 on machines that do not have it configured
|
||||
*
|
||||
*/
|
||||
@ -696,9 +696,9 @@
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* addx8
|
||||
*
|
||||
*
|
||||
* implements addx8 on machines that do not have it configured
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#if !XCHAL_HAVE_ADDX
|
||||
@ -731,7 +731,7 @@
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* rfe_rfue
|
||||
*
|
||||
*
|
||||
* Maps to RFUE on XEA1, and RFE on XEA2. No mapping on XEAX.
|
||||
*/
|
||||
|
||||
@ -744,11 +744,11 @@
|
||||
rfe
|
||||
.endm
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* abi_entry
|
||||
*
|
||||
*
|
||||
* Generate proper function entry sequence for the current ABI
|
||||
* (windowed or call0). Takes care of allocating stack space (up to 1kB)
|
||||
* and saving the return PC, if necessary. The corresponding abi_return
|
||||
@ -882,7 +882,7 @@
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* abi_return
|
||||
*
|
||||
*
|
||||
* Generate proper function exit sequence for the current ABI
|
||||
* (windowed or call0). Takes care of freeing stack space and
|
||||
* restoring the return PC, if necessary.
|
||||
|
@ -34,7 +34,7 @@
|
||||
#define XTPERF_CNT_DCACHE_MISSES 0x8006 /* DCache misses penalty in cycles */
|
||||
|
||||
#define XTPERF_CNT_CYCLES 0 /* Count cycles */
|
||||
#define XTPERF_CNT_OVERFLOW 1 /* Overflow of counter n-1 (assuming this is counter n) */
|
||||
#define XTPERF_CNT_OVERFLOW 1 /* Overflow of counter n-1 (assuming this is counter n) */
|
||||
#define XTPERF_CNT_INSN 2 /* Successfully completed instructions */
|
||||
#define XTPERF_CNT_D_STALL 3 /* Data-related GlobalStall cycles */
|
||||
#define XTPERF_CNT_I_STALL 4 /* Instruction-related and other GlobalStall cycles */
|
||||
@ -67,18 +67,18 @@
|
||||
#define XTPERF_MASK_COMMITTED_INSN 0x0001
|
||||
|
||||
/* XTPERF_CNT_BRANCH_PENALTY selector mask */
|
||||
|
||||
|
||||
#define XTPERF_MASK_BRANCH_PENALTY 0x0001
|
||||
|
||||
/* XTPERF_CNT_PIPELINE_INTERLOCKS selector mask */
|
||||
|
||||
#define XTPERF_MASK_PIPELINE_INTERLOCKS 0x0001
|
||||
|
||||
/* XTPERF_CNT_ICACHE_MISSES selector mask */
|
||||
/* XTPERF_CNT_ICACHE_MISSES selector mask */
|
||||
|
||||
#define XTPERF_MASK_ICACHE_MISSES 0x0001
|
||||
|
||||
/* XTPERF_CNT_DCACHE_MISSES selector mask */
|
||||
/* XTPERF_CNT_DCACHE_MISSES selector mask */
|
||||
|
||||
#define XTPERF_MASK_DCACHE_MISSES 0x0001
|
||||
|
||||
|
@ -156,6 +156,6 @@ extern "C" {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __H_LIBDB_MACROS */
|
||||
|
||||
|
Reference in New Issue
Block a user