event loop: re-implement based on esp_event library

Includes ds2ds unit test fix, iperf example test fix
This commit is contained in:
Ivan Grokhotkov
2018-11-06 11:09:32 +08:00
parent 1872e34115
commit b1d1e37f87
18 changed files with 952 additions and 811 deletions

View File

@@ -168,6 +168,12 @@ typedef struct {
tcpip_adapter_ip6_info_t ip6_info; /*!< IPv6 address of the interface */
} ip_event_got_ip6_t;
/** Event structure for IP_EVENT_AP_STAIPASSIGNED event */
typedef struct {
ip4_addr_t ip; /*!< IP address which was assigned to the station */
} ip_event_ap_staipassigned_t;
/**
* @brief Initialize the underlying TCP/IP stack
*
@@ -686,6 +692,40 @@ esp_err_t tcpip_adapter_get_netif(tcpip_adapter_if_t tcpip_if, void ** netif);
*/
bool tcpip_adapter_is_netif_up(tcpip_adapter_if_t tcpip_if);
/**
* @brief Install default event handlers for Ethernet interface
* @return
* - ESP_OK on success
* - one of the errors from esp_event on failure
*/
esp_err_t tcpip_adapter_set_default_eth_handlers();
/**
* @brief Uninstall default event handlers for Ethernet interface
* @return
* - ESP_OK on success
* - one of the errors from esp_event on failure
*/
esp_err_t tcpip_adapter_clear_default_eth_handlers();
/**
* @brief Install default event handlers for Wi-Fi interfaces (station and AP)
* @return
* - ESP_OK on success
* - one of the errors from esp_event on failure
*/
esp_err_t tcpip_adapter_set_default_wifi_handlers();
/**
* @brief Uninstall default event handlers for Wi-Fi interfaces (station and AP)
* @return
* - ESP_OK on success
* - one of the errors from esp_event on failure
*/
esp_err_t tcpip_adapter_clear_default_wifi_handlers();
#ifdef __cplusplus
}
#endif