mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-22 17:47:04 +08:00
docs(doxygen): Fix header files which is not doxygen style
This commit is contained in:
@ -34,8 +34,8 @@ typedef enum {
|
|||||||
* @brief ADC initialization parameter structure type definition
|
* @brief ADC initialization parameter structure type definition
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
adc_mode_t mode;
|
adc_mode_t mode; /*!< ADC mode */
|
||||||
uint8_t clk_div; // ADC sample collection clock=80M/clk_div, range[8, 32]
|
uint8_t clk_div; /*!< ADC sample collection clock=80M/clk_div, range[8, 32] */
|
||||||
} adc_config_t;
|
} adc_config_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -133,7 +133,7 @@ typedef void *gpio_isr_handle_t;
|
|||||||
*
|
*
|
||||||
* Configure GPIO's Mode,pull-up,PullDown,IntrType
|
* Configure GPIO's Mode,pull-up,PullDown,IntrType
|
||||||
*
|
*
|
||||||
* @param gpio_config Pointer to GPIO configure struct
|
* @param gpio_cfg Pointer to GPIO configure struct
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* - ESP_OK success
|
* - ESP_OK success
|
||||||
|
@ -105,14 +105,14 @@ typedef enum {
|
|||||||
*/
|
*/
|
||||||
typedef union {
|
typedef union {
|
||||||
struct {
|
struct {
|
||||||
uint32_t read_buffer: 1;
|
uint32_t read_buffer: 1; /*!< configurate intterrupt to enable reading */
|
||||||
uint32_t write_buffer: 1;
|
uint32_t write_buffer: 1; /*!< configurate intterrupt to enable writing */
|
||||||
uint32_t read_status: 1;
|
uint32_t read_status: 1; /*!< configurate intterrupt to enable reading status */
|
||||||
uint32_t write_status: 1;
|
uint32_t write_status: 1; /*!< configurate intterrupt to enable writing status */
|
||||||
uint32_t trans_done: 1;
|
uint32_t trans_done: 1; /*!< configurate intterrupt to enable transmission done */
|
||||||
uint32_t reserved5: 27;
|
uint32_t reserved5: 27; /*!< reserved */
|
||||||
};
|
}; /*!< not filled */
|
||||||
uint32_t val;
|
uint32_t val; /*!< union fill */
|
||||||
} spi_intr_enable_t;
|
} spi_intr_enable_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -130,38 +130,38 @@ typedef union {
|
|||||||
uint32_t miso_en: 1; /*!< MISO line enable */
|
uint32_t miso_en: 1; /*!< MISO line enable */
|
||||||
uint32_t cs_en: 1; /*!< CS line enable */
|
uint32_t cs_en: 1; /*!< CS line enable */
|
||||||
uint32_t reserved9: 23; /*!< resserved */
|
uint32_t reserved9: 23; /*!< resserved */
|
||||||
};
|
}; /*!< not filled */
|
||||||
uint32_t val;
|
uint32_t val; /*!< union fill */
|
||||||
} spi_interface_t;
|
} spi_interface_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief SPI transmission parameter structure type definition
|
* @brief SPI transmission parameter structure type definition
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint16_t *cmd;
|
uint16_t *cmd; /*!< SPI transmission command */
|
||||||
uint32_t *addr;
|
uint32_t *addr; /*!< SPI transmission address */
|
||||||
uint32_t *mosi;
|
uint32_t *mosi; /*!< SPI transmission MOSI buffer */
|
||||||
uint32_t *miso;
|
uint32_t *miso; /*!< SPI transmission MISO buffer */
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
uint32_t cmd: 5;
|
uint32_t cmd: 5; /*!< SPI transmission command bits */
|
||||||
uint32_t addr: 7;
|
uint32_t addr: 7; /*!< SPI transmission address bits */
|
||||||
uint32_t mosi: 10;
|
uint32_t mosi: 10; /*!< SPI transmission MOSI buffer bits */
|
||||||
uint32_t miso: 10;
|
uint32_t miso: 10; /*!< SPI transmission MISO buffer bits */
|
||||||
};
|
}; /*!< not filled */
|
||||||
uint32_t val;
|
uint32_t val; /*!< union fill */
|
||||||
} bits;
|
} bits; /*!< SPI transmission packet members' bits */
|
||||||
} spi_trans_t;
|
} spi_trans_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief SPI initialization parameter structure type definition
|
* @brief SPI initialization parameter structure type definition
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
spi_interface_t interface;
|
spi_interface_t interface; /*!< SPI bus interface */
|
||||||
spi_intr_enable_t intr_enable;
|
spi_intr_enable_t intr_enable; /*!< check if enable SPI interrupt */
|
||||||
spi_event_callback_t event_cb;
|
spi_event_callback_t event_cb; /*!< SPI interrupt event callback */
|
||||||
spi_mode_t mode;
|
spi_mode_t mode; /*!< SPI mode */
|
||||||
spi_clk_div_t clk_div;
|
spi_clk_div_t clk_div; /*!< SPI clock divider */
|
||||||
} spi_config_t;
|
} spi_config_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,13 +20,13 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** \defgroup System_Sleep_APIs System Sleep APIs
|
typedef enum {
|
||||||
* @brief System Sleep APIs
|
WIFI_NONE_SLEEP_T = 0,
|
||||||
*/
|
WIFI_LIGHT_SLEEP_T,
|
||||||
|
WIFI_MODEM_SLEEP_T
|
||||||
|
} wifi_sleep_type_t;
|
||||||
|
|
||||||
/** @addtogroup System_Sleep_APIs
|
typedef void (*fpm_wakeup_cb)(void);
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the chip to deep-sleep mode.
|
* @brief Set the chip to deep-sleep mode.
|
||||||
@ -40,7 +40,7 @@ extern "C" {
|
|||||||
* up, connect a GPIO to pin RST, the chip will wake up by a falling-edge
|
* up, connect a GPIO to pin RST, the chip will wake up by a falling-edge
|
||||||
* on pin RST
|
* on pin RST
|
||||||
*
|
*
|
||||||
* @param uint32 time_in_us : deep-sleep time, unit: microsecond
|
* @param time_in_us deep-sleep time, unit: microsecond
|
||||||
*
|
*
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
@ -53,14 +53,14 @@ void esp_deep_sleep(uint32_t time_in_us);
|
|||||||
*
|
*
|
||||||
* If this API is not called, default to be esp_deep_sleep_set_rf_option(1).
|
* If this API is not called, default to be esp_deep_sleep_set_rf_option(1).
|
||||||
*
|
*
|
||||||
* @param uint8 option :
|
* @param option radio option
|
||||||
* @param 0 : Radio calibration after the deep-sleep wakeup is decided by byte
|
* 0 : Radio calibration after the deep-sleep wakeup is decided by byte
|
||||||
* 108 of esp_init_data_default.bin (0~127byte).
|
* 108 of esp_init_data_default.bin (0~127byte).
|
||||||
* @param 1 : Radio calibration will be done after the deep-sleep wakeup. This
|
* 1 : Radio calibration will be done after the deep-sleep wakeup. This
|
||||||
* will lead to stronger current.
|
* will lead to stronger current.
|
||||||
* @param 2 : Radio calibration will not be done after the deep-sleep wakeup.
|
* 2 : Radio calibration will not be done after the deep-sleep wakeup.
|
||||||
* This will lead to weaker current.
|
* This will lead to weaker current.
|
||||||
* @param 4 : Disable radio calibration after the deep-sleep wakeup (the same
|
* 4 : Disable radio calibration after the deep-sleep wakeup (the same
|
||||||
* as modem-sleep). This will lead to the weakest current, but the device
|
* as modem-sleep). This will lead to the weakest current, but the device
|
||||||
* can't receive or transmit data after waking up.
|
* can't receive or transmit data after waking up.
|
||||||
*
|
*
|
||||||
@ -68,40 +68,11 @@ void esp_deep_sleep(uint32_t time_in_us);
|
|||||||
*/
|
*/
|
||||||
void esp_deep_sleep_set_rf_option(uint8_t option);
|
void esp_deep_sleep_set_rf_option(uint8_t option);
|
||||||
|
|
||||||
/** \defgroup WiFi_Sleep_Type_APIs Sleep Type APIs
|
|
||||||
* @brief WiFi Sleep APIs
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @addtogroup WiFi_Sleep_Type_APIs
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
WIFI_NONE_SLEEP_T = 0,
|
|
||||||
WIFI_LIGHT_SLEEP_T,
|
|
||||||
WIFI_MODEM_SLEEP_T
|
|
||||||
} wifi_sleep_type_t;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/** \defgroup WiFi_Force_Sleep_APIs Force Sleep APIs
|
|
||||||
* @brief WiFi Force Sleep APIs
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @addtogroup WiFi_Force_Sleep_APIs
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable force sleep function.
|
* @brief Enable force sleep function.
|
||||||
*
|
*
|
||||||
* @attention Force sleep function is disabled by default.
|
* @attention Force sleep function is disabled by default.
|
||||||
*
|
*
|
||||||
* @param null
|
|
||||||
*
|
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
void esp_wifi_fpm_open(void);
|
void esp_wifi_fpm_open(void);
|
||||||
@ -109,8 +80,6 @@ void esp_wifi_fpm_open(void);
|
|||||||
/**
|
/**
|
||||||
* @brief Disable force sleep function.
|
* @brief Disable force sleep function.
|
||||||
*
|
*
|
||||||
* @param null
|
|
||||||
*
|
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
void esp_wifi_fpm_close(void);
|
void esp_wifi_fpm_close(void);
|
||||||
@ -122,14 +91,10 @@ void esp_wifi_fpm_close(void);
|
|||||||
* is enabled, after calling wifi_fpm_open.
|
* is enabled, after calling wifi_fpm_open.
|
||||||
* This API can not be called after calling wifi_fpm_close.
|
* This API can not be called after calling wifi_fpm_close.
|
||||||
*
|
*
|
||||||
* @param null
|
|
||||||
*
|
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
void esp_wifi_fpm_do_wakeup(void);
|
void esp_wifi_fpm_do_wakeup(void);
|
||||||
|
|
||||||
typedef void (*fpm_wakeup_cb)(void);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set a callback of waken up from force sleep because of time out.
|
* @brief Set a callback of waken up from force sleep because of time out.
|
||||||
*
|
*
|
||||||
@ -141,7 +106,7 @@ typedef void (*fpm_wakeup_cb)(void);
|
|||||||
* @attention 3. fpm_wakeup_cb_func will not be called if woke up by wifi_fpm_do_wakeup
|
* @attention 3. fpm_wakeup_cb_func will not be called if woke up by wifi_fpm_do_wakeup
|
||||||
* from MODEM_SLEEP_T type force sleep.
|
* from MODEM_SLEEP_T type force sleep.
|
||||||
*
|
*
|
||||||
* @param void (*fpm_wakeup_cb_func)(void) : callback of waken up
|
* @param cb callback of waken up
|
||||||
*
|
*
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
@ -157,7 +122,7 @@ void esp_wifi_fpm_set_wakeup_cb(fpm_wakeup_cb cb);
|
|||||||
* in the system idle task. Please do not call other WiFi related function right
|
* in the system idle task. Please do not call other WiFi related function right
|
||||||
* after calling this API.
|
* after calling this API.
|
||||||
*
|
*
|
||||||
* @param uint32 sleep_time_in_us : sleep time, ESP8266 will wake up automatically
|
* @param sleep_time_in_us sleep time, ESP8266 will wake up automatically
|
||||||
* when time out. Unit: us. Range: 10000 ~ 268435455(0xFFFFFFF).
|
* when time out. Unit: us. Range: 10000 ~ 268435455(0xFFFFFFF).
|
||||||
* - If sleep_time_in_us is 0xFFFFFFF, the ESP8266 will sleep till
|
* - If sleep_time_in_us is 0xFFFFFFF, the ESP8266 will sleep till
|
||||||
* - if wifi_fpm_set_sleep_type is set to be LIGHT_SLEEP_T, ESP8266 can wake up by GPIO.
|
* - if wifi_fpm_set_sleep_type is set to be LIGHT_SLEEP_T, ESP8266 can wake up by GPIO.
|
||||||
@ -175,7 +140,7 @@ esp_err_t esp_wifi_fpm_do_sleep(uint32_t sleep_time_in_us);
|
|||||||
*
|
*
|
||||||
* @attention This API can only be called before wifi_fpm_open.
|
* @attention This API can only be called before wifi_fpm_open.
|
||||||
*
|
*
|
||||||
* @param wifi_sleep_type_t type : sleep type
|
* @param type sleep type
|
||||||
*
|
*
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
@ -184,8 +149,6 @@ void esp_wifi_fpm_set_sleep_type(wifi_sleep_type_t type);
|
|||||||
/**
|
/**
|
||||||
* @brief Get sleep type of force sleep function.
|
* @brief Get sleep type of force sleep function.
|
||||||
*
|
*
|
||||||
* @param null
|
|
||||||
*
|
|
||||||
* @return sleep type
|
* @return sleep type
|
||||||
*/
|
*/
|
||||||
wifi_sleep_type_t esp_wifi_fpm_get_sleep_type(void);
|
wifi_sleep_type_t esp_wifi_fpm_get_sleep_type(void);
|
||||||
@ -200,10 +163,11 @@ wifi_sleep_type_t esp_wifi_fpm_get_sleep_type(void);
|
|||||||
* • If the GPIO is still in the wakeup status, the EP8266 will enter modem-sleep mode instead;
|
* • If the GPIO is still in the wakeup status, the EP8266 will enter modem-sleep mode instead;
|
||||||
* • If the GPIO is NOT in the wakeup status, the ESP8266 will enter light-sleep mode
|
* • If the GPIO is NOT in the wakeup status, the ESP8266 will enter light-sleep mode
|
||||||
*
|
*
|
||||||
* @param uint32_t gpio_num: GPIO number, range: [0, 15].
|
* @param gpio_num GPIO number, range: [0, 15].
|
||||||
* gpio_int_type_t intr_status: status of GPIO interrupt to trigger the wakeup process.
|
* gpio_int_type_t intr_status: status of GPIO interrupt to trigger the wakeup process.
|
||||||
* - if esp_wifi_fpm_set_sleep_type is set to be LIGHT_SLEEP_T, ESP8266 can wake up by GPIO.
|
* - if esp_wifi_fpm_set_sleep_type is set to be LIGHT_SLEEP_T, ESP8266 can wake up by GPIO.
|
||||||
* - if esp_wifi_fpm_set_sleep_type is set to be MODEM_SLEEP_T, ESP8266 can wake up by esp_wifi_fpm_do_wakeup.
|
* - if esp_wifi_fpm_set_sleep_type is set to be MODEM_SLEEP_T, ESP8266 can wake up by esp_wifi_fpm_do_wakeup.
|
||||||
|
* @param intr_status GPIO interrupt type
|
||||||
*
|
*
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
@ -211,17 +175,9 @@ void esp_wifi_enable_gpio_wakeup(uint32_t gpio_num, gpio_int_type_t intr_status)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable the function that the GPIO can wake the ESP8266 up from light-sleep mode.
|
* @brief Disable the function that the GPIO can wake the ESP8266 up from light-sleep mode.
|
||||||
*
|
|
||||||
* @param null
|
|
||||||
*
|
|
||||||
* @return null
|
|
||||||
*/
|
*/
|
||||||
void esp_wifi_disable_gpio_wakeup(void);
|
void esp_wifi_disable_gpio_wakeup(void);
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -242,8 +242,6 @@ void esp_chip_info(esp_chip_info_t* out_info);
|
|||||||
* Flash map depends on the selection when compiling, more details in document
|
* Flash map depends on the selection when compiling, more details in document
|
||||||
* "2A-ESP8266__IOT_SDK_User_Manual"
|
* "2A-ESP8266__IOT_SDK_User_Manual"
|
||||||
*
|
*
|
||||||
* @param null
|
|
||||||
*
|
|
||||||
* @return enum flash_size_map
|
* @return enum flash_size_map
|
||||||
*/
|
*/
|
||||||
flash_size_map system_get_flash_size_map(void);
|
flash_size_map system_get_flash_size_map(void);
|
||||||
|
@ -897,9 +897,12 @@ esp_err_t esp_wifi_get_event_mask(uint32_t *mask);
|
|||||||
* the next packet is allowed to send. Otherwise, wifi_send_pkt_freedom
|
* the next packet is allowed to send. Otherwise, wifi_send_pkt_freedom
|
||||||
* will return fail.
|
* will return fail.
|
||||||
*
|
*
|
||||||
* @param const void *buffer: pointer of packet
|
* @param ifx interface if the Wi-Fi mode is Station, the ifx should be WIFI_IF_STA. If the Wi-Fi
|
||||||
* @param int len: packet length
|
* mode is SoftAP, the ifx should be WIFI_IF_AP. If the Wi-Fi mode is Station+SoftAP, the
|
||||||
* @param bool en_sys_seq: follow the system's 802.11 packets sequence number or not,
|
* ifx should be WIFI_IF_STA or WIFI_IF_AP. If the ifx is wrong, the API returns ESP_ERR_WIFI_IF.
|
||||||
|
* @param buffer pointer of packet
|
||||||
|
* @param len packet length
|
||||||
|
* @param en_sys_seq follow the system's 802.11 packets sequence number or not,
|
||||||
* if it is true, the sequence number will be increased 1 every
|
* if it is true, the sequence number will be increased 1 every
|
||||||
* time a packet sent.
|
* time a packet sent.
|
||||||
*
|
*
|
||||||
|
@ -300,14 +300,14 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
signed rssi: 8; /**< signal intensity of packet */
|
signed rssi: 8; /**< signal intensity of packet */
|
||||||
unsigned rate: 4; /**< data rate */
|
unsigned rate: 4; /**< data rate */
|
||||||
unsigned is_group: 1;
|
unsigned is_group: 1; /**< usually not used */
|
||||||
unsigned : 1; /**< reserve */
|
unsigned : 1; /**< reserve */
|
||||||
unsigned sig_mode: 2; /**< 0:is not 11n packet; 1:is 11n packet */
|
unsigned sig_mode: 2; /**< 0:is not 11n packet; 1:is 11n packet */
|
||||||
unsigned legacy_length: 12;
|
unsigned legacy_length: 12; /**< usually not used */
|
||||||
unsigned damatch0: 1;
|
unsigned damatch0: 1; /**< usually not used */
|
||||||
unsigned damatch1: 1;
|
unsigned damatch1: 1; /**< usually not used */
|
||||||
unsigned bssidmatch0: 1;
|
unsigned bssidmatch0: 1; /**< usually not used */
|
||||||
unsigned bssidmatch1: 1;
|
unsigned bssidmatch1: 1; /**< usually not used */
|
||||||
unsigned mcs: 7; /**< if is 11n packet, shows the modulation(range from 0 to 76) */
|
unsigned mcs: 7; /**< if is 11n packet, shows the modulation(range from 0 to 76) */
|
||||||
unsigned cwb: 1; /**< if is 11n packet, shows if is HT40 packet or not */
|
unsigned cwb: 1; /**< if is 11n packet, shows if is HT40 packet or not */
|
||||||
unsigned HT_length: 16; /**< reserve */
|
unsigned HT_length: 16; /**< reserve */
|
||||||
@ -318,11 +318,11 @@ typedef struct {
|
|||||||
unsigned stbc: 2; /**< STBC */
|
unsigned stbc: 2; /**< STBC */
|
||||||
unsigned fec_coding: 1; /**< Flag is set for 11n packets which are LDPC */
|
unsigned fec_coding: 1; /**< Flag is set for 11n packets which are LDPC */
|
||||||
unsigned sgi: 1; /**< SGI */
|
unsigned sgi: 1; /**< SGI */
|
||||||
unsigned rxend_state: 8;
|
unsigned rxend_state: 8; /**< usually not used */
|
||||||
unsigned ampdu_cnt: 8; /**< ampdu cnt */
|
unsigned ampdu_cnt: 8; /**< ampdu cnt */
|
||||||
unsigned channel: 4; /**< which channel this packet in */
|
unsigned channel: 4; /**< which channel this packet in */
|
||||||
unsigned : 4; /**< reserve */
|
unsigned : 4; /**< reserve */
|
||||||
signed noise_floor: 8;
|
signed noise_floor: 8; /**< usually not used */
|
||||||
} wifi_pkt_rx_ctrl_t;
|
} wifi_pkt_rx_ctrl_t;
|
||||||
|
|
||||||
/** @brief Payload passed to 'buf' parameter of promiscuous mode RX callback.
|
/** @brief Payload passed to 'buf' parameter of promiscuous mode RX callback.
|
||||||
@ -372,6 +372,9 @@ typedef struct {
|
|||||||
#define WIFI_EVENT_MASK_NONE (0) /**< mask none of the WiFi events */
|
#define WIFI_EVENT_MASK_NONE (0) /**< mask none of the WiFi events */
|
||||||
#define WIFI_EVENT_MASK_AP_PROBEREQRECVED (BIT(0)) /**< mask SYSTEM_EVENT_AP_PROBEREQRECVED event */
|
#define WIFI_EVENT_MASK_AP_PROBEREQRECVED (BIT(0)) /**< mask SYSTEM_EVENT_AP_PROBEREQRECVED event */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief WIFI hardware TX result code
|
||||||
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
TX_STATUS_SUCCESS = 1,
|
TX_STATUS_SUCCESS = 1,
|
||||||
TX_STATUS_SRC_EXCEED,
|
TX_STATUS_SRC_EXCEED,
|
||||||
@ -379,6 +382,9 @@ typedef enum {
|
|||||||
TX_STATUS_DISCARD,
|
TX_STATUS_DISCARD,
|
||||||
} wifi_tx_result_t;
|
} wifi_tx_result_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief WIFI hardware TX rate
|
||||||
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PHY_RATE_1_LONG,
|
PHY_RATE_1_LONG,
|
||||||
PHY_RATE_2_LONG,
|
PHY_RATE_2_LONG,
|
||||||
@ -398,12 +404,15 @@ typedef enum {
|
|||||||
PHY_RATE_9,
|
PHY_RATE_9,
|
||||||
} wifi_tx_rate_t;
|
} wifi_tx_rate_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief WIFI hardware TX status
|
||||||
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned wifi_tx_result: 8;
|
unsigned wifi_tx_result: 8; /*!< TX status code, descripted by "wifi_tx_result_t" */
|
||||||
unsigned wifi_tx_src: 6;
|
unsigned wifi_tx_src: 6; /*!< TX status SRC */
|
||||||
unsigned wifi_tx_lrc: 6;
|
unsigned wifi_tx_lrc: 6; /*!< TX status LRC */
|
||||||
unsigned wifi_tx_rate: 8;
|
unsigned wifi_tx_rate: 8; /*!< TX rate, descripted by "wifi_tx_rate_t" */
|
||||||
unsigned unused: 4;
|
unsigned unused: 4; /*!< Resolved */
|
||||||
} wifi_tx_status_t;
|
} wifi_tx_status_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -131,7 +131,7 @@ void *_heap_caps_malloc(size_t size, uint32_t caps, const char *file, size_t lin
|
|||||||
*
|
*
|
||||||
* @param ptr Pointer to memory previously returned from heap_caps_(m/c/re/z)alloc(). Can be NULL.
|
* @param ptr Pointer to memory previously returned from heap_caps_(m/c/re/z)alloc(). Can be NULL.
|
||||||
*/
|
*/
|
||||||
#define heap_caps_free(p) _heap_caps_free(p, __ESP_FILE__, __LINE__)
|
#define heap_caps_free(ptr) _heap_caps_free(ptr, __ESP_FILE__, __LINE__)
|
||||||
|
|
||||||
void _heap_caps_free(void *ptr, const char *file, size_t line);
|
void _heap_caps_free(void *ptr, const char *file, size_t line);
|
||||||
|
|
||||||
@ -179,7 +179,6 @@ void *_heap_caps_realloc(void *mem, size_t newsize, uint32_t caps, const char *f
|
|||||||
*
|
*
|
||||||
* In IDF, ``calloc(c, s)`` is equivalent to ``heap_caps_calloc(c, s, MALLOC_CAP_32BIT)``.
|
* In IDF, ``calloc(c, s)`` is equivalent to ``heap_caps_calloc(c, s, MALLOC_CAP_32BIT)``.
|
||||||
*
|
*
|
||||||
* @param n Number of continuing chunks of memory to allocate
|
|
||||||
* @param size Size, in bytes, of a chunk of memory to allocate
|
* @param size Size, in bytes, of a chunk of memory to allocate
|
||||||
* @param caps Bitwise OR of MALLOC_CAP_* flags indicating the type of memory to be returned
|
* @param caps Bitwise OR of MALLOC_CAP_* flags indicating the type of memory to be returned
|
||||||
*
|
*
|
||||||
|
@ -26,8 +26,11 @@ typedef enum {
|
|||||||
HEAP_TRACE_LEAKS,
|
HEAP_TRACE_LEAKS,
|
||||||
} heap_trace_mode_t;
|
} heap_trace_mode_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief heap trace record information(not used)
|
||||||
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char buf[1];
|
char buf[1]; /*!< record buffer */
|
||||||
} heap_trace_record_t;
|
} heap_trace_record_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,35 +68,50 @@ extern "C" {
|
|||||||
|
|
||||||
#define IPV6STR "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x"
|
#define IPV6STR "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TCP-IP adapter IPV4 address information
|
||||||
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ip4_addr_t ip;
|
ip4_addr_t ip; /**< TCP-IP adatpter IPV4 addresss */
|
||||||
ip4_addr_t netmask;
|
ip4_addr_t netmask; /**< TCP-IP adatpter IPV4 netmask */
|
||||||
ip4_addr_t gw;
|
ip4_addr_t gw; /**< TCP-IP adatpter IPV4 gateway */
|
||||||
} tcpip_adapter_ip_info_t;
|
} tcpip_adapter_ip_info_t;
|
||||||
|
|
||||||
#if TCPIP_ADAPTER_IPV6
|
#if TCPIP_ADAPTER_IPV6
|
||||||
|
/**
|
||||||
|
* @brief TCP-IP adapter IPV6 address information if enable IPV6 of LwIP
|
||||||
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ip6_addr_t ip;
|
ip6_addr_t ip; /**< TCP-IP adatpter IPV6 addresss */
|
||||||
} tcpip_adapter_ip6_info_t;
|
} tcpip_adapter_ip6_info_t;
|
||||||
#else
|
#else
|
||||||
|
/**
|
||||||
|
* @brief TCP-IP adapter IPV6 address information if disable IPV6 of LwIP
|
||||||
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct {
|
struct {
|
||||||
uint32_t addr[4];
|
uint32_t addr[4]; /**< TCP-IP adatpter IPV4 addresss data */
|
||||||
} ip;
|
} ip; /**< TCP-IP adatpter IPV4 addresss */
|
||||||
} tcpip_adapter_ip6_info_t;
|
} tcpip_adapter_ip6_info_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef dhcps_lease_t tcpip_adapter_dhcps_lease_t;
|
typedef dhcps_lease_t tcpip_adapter_dhcps_lease_t;
|
||||||
|
|
||||||
#if CONFIG_DHCP_STA_LIST
|
#if CONFIG_DHCP_STA_LIST
|
||||||
|
/**
|
||||||
|
* @brief TCP-IP adapter station information
|
||||||
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t mac[6];
|
uint8_t mac[6]; /**< TCP-IP adatpter station MAC address */
|
||||||
ip4_addr_t ip;
|
ip4_addr_t ip; /**< TCP-IP adatpter station IPV4 addresss */
|
||||||
} tcpip_adapter_sta_info_t;
|
} tcpip_adapter_sta_info_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TCP-IP adapter station information table
|
||||||
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
tcpip_adapter_sta_info_t sta[ESP_WIFI_MAX_CONN_NUM];
|
tcpip_adapter_sta_info_t sta[ESP_WIFI_MAX_CONN_NUM]; /**< adapter station information array */
|
||||||
int num;
|
int num; /**< adapter station information number */
|
||||||
} tcpip_adapter_sta_list_t;
|
} tcpip_adapter_sta_list_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -114,9 +129,9 @@ typedef struct {
|
|||||||
|
|
||||||
/* TODO: add Ethernet interface */
|
/* TODO: add Ethernet interface */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
TCPIP_ADAPTER_IF_STA = 0, /**< ESP32 station interface */
|
TCPIP_ADAPTER_IF_STA = 0, /**< TCP-IP adatpter station interface */
|
||||||
TCPIP_ADAPTER_IF_AP, /**< ESP32 soft-AP interface */
|
TCPIP_ADAPTER_IF_AP, /**< TCP-IP adatpter soft-AP interface */
|
||||||
TCPIP_ADAPTER_IF_ETH, /**< ESP32 ethernet interface */
|
TCPIP_ADAPTER_IF_ETH, /**< TCP-IP adatpter ethernet interface */
|
||||||
TCPIP_ADAPTER_IF_MAX
|
TCPIP_ADAPTER_IF_MAX
|
||||||
} tcpip_adapter_if_t;
|
} tcpip_adapter_if_t;
|
||||||
|
|
||||||
@ -128,9 +143,11 @@ typedef enum {
|
|||||||
TCPIP_ADAPTER_DNS_MAX /**Max DNS */
|
TCPIP_ADAPTER_DNS_MAX /**Max DNS */
|
||||||
} tcpip_adapter_dns_type_t;
|
} tcpip_adapter_dns_type_t;
|
||||||
|
|
||||||
/*info of DNS server*/
|
/**
|
||||||
|
* @brief TCP-IP adapter DNS server information
|
||||||
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ip_addr_t ip;
|
ip_addr_t ip; /**< DNS IP addresss */
|
||||||
} tcpip_adapter_dns_info_t;
|
} tcpip_adapter_dns_info_t;
|
||||||
|
|
||||||
/* status of DHCP client or DHCP server */
|
/* status of DHCP client or DHCP server */
|
||||||
@ -159,27 +176,37 @@ typedef enum{
|
|||||||
|
|
||||||
struct tcpip_adapter_api_msg_s;
|
struct tcpip_adapter_api_msg_s;
|
||||||
typedef int (*tcpip_adapter_api_fn)(struct tcpip_adapter_api_msg_s *msg);
|
typedef int (*tcpip_adapter_api_fn)(struct tcpip_adapter_api_msg_s *msg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TCP-IP adapter async messsage
|
||||||
|
*/
|
||||||
typedef struct tcpip_adapter_api_msg_s {
|
typedef struct tcpip_adapter_api_msg_s {
|
||||||
int type; /**< The first field MUST be int */
|
int type; /**< TCP-IP adatpter API message type */
|
||||||
int ret;
|
int ret; /**< TCP-IP adatpter API message process result */
|
||||||
tcpip_adapter_api_fn api_fn;
|
tcpip_adapter_api_fn api_fn; /**< TCP-IP adatpter API message function */
|
||||||
tcpip_adapter_if_t tcpip_if;
|
tcpip_adapter_if_t tcpip_if; /**< TCP-IP adatpter API message interface type */
|
||||||
tcpip_adapter_ip_info_t *ip_info;
|
tcpip_adapter_ip_info_t *ip_info; /**< TCP-IP adatpter API message IP information */
|
||||||
uint8_t *mac;
|
uint8_t *mac; /**< TCP-IP adatpter API message MAC address */
|
||||||
void *data;
|
void *data; /**< TCP-IP adatpter API message MAC private data */
|
||||||
} tcpip_adapter_api_msg_t;
|
} tcpip_adapter_api_msg_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TCP-IP adapter DNS parameters
|
||||||
|
*/
|
||||||
typedef struct tcpip_adapter_dns_param_s {
|
typedef struct tcpip_adapter_dns_param_s {
|
||||||
tcpip_adapter_dns_type_t dns_type;
|
tcpip_adapter_dns_type_t dns_type; /**< DNS type */
|
||||||
tcpip_adapter_dns_info_t *dns_info;
|
tcpip_adapter_dns_info_t *dns_info; /**< DNS information */
|
||||||
} tcpip_adapter_dns_param_t;
|
} tcpip_adapter_dns_param_t;
|
||||||
|
|
||||||
#define TCPIP_ADAPTER_TRHEAD_SAFE 1
|
#define TCPIP_ADAPTER_TRHEAD_SAFE 1
|
||||||
#define TCPIP_ADAPTER_IPC_LOCAL 0
|
#define TCPIP_ADAPTER_IPC_LOCAL 0
|
||||||
#define TCPIP_ADAPTER_IPC_REMOTE 1
|
#define TCPIP_ADAPTER_IPC_REMOTE 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TCP-IP adapter IP lost checking timer
|
||||||
|
*/
|
||||||
typedef struct tcpip_adatper_ip_lost_timer_s {
|
typedef struct tcpip_adatper_ip_lost_timer_s {
|
||||||
bool timer_running;
|
bool timer_running; /**< check if the timer if running */
|
||||||
} tcpip_adapter_ip_lost_timer_t;
|
} tcpip_adapter_ip_lost_timer_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,3 +81,8 @@ wear-levelling.rst:line: WARNING: Duplicate declaration, bool esp_vfs_fat_mount_
|
|||||||
wear-levelling.rst:line: WARNING: Duplicate declaration, int esp_vfs_fat_mount_config_t::max_files
|
wear-levelling.rst:line: WARNING: Duplicate declaration, int esp_vfs_fat_mount_config_t::max_files
|
||||||
wear-levelling.rst:line: WARNING: Duplicate declaration, size_t esp_vfs_fat_mount_config_t::allocation_unit_size
|
wear-levelling.rst:line: WARNING: Duplicate declaration, size_t esp_vfs_fat_mount_config_t::allocation_unit_size
|
||||||
wear-levelling.rst:line: WARNING: Duplicate declaration, esp_vfs_fat_mount_config_t
|
wear-levelling.rst:line: WARNING: Duplicate declaration, esp_vfs_fat_mount_config_t
|
||||||
|
|
||||||
|
spi.inc:line: WARNING: Duplicate declaration, uint32_t spi_trans_t::cmd
|
||||||
|
spi.inc:line: WARNING: Duplicate declaration, uint32_t spi_trans_t::addr
|
||||||
|
spi.inc:line: WARNING: Duplicate declaration, uint32_t spi_trans_t::mosi
|
||||||
|
spi.inc:line: WARNING: Duplicate declaration, uint32_t spi_trans_t::miso
|
||||||
|
Reference in New Issue
Block a user