mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-02 21:41:01 +02:00
Update IDF to 9a26296
This commit is contained in:
@ -154,6 +154,10 @@ typedef struct tcpip_adapter_api_msg_s {
|
||||
|
||||
#define TCPIP_ADAPTER_IPC_CALL(_if, _mac, _ip, _hostname, _fn) do {\
|
||||
tcpip_adapter_api_msg_t msg;\
|
||||
if (tcpip_inited == false) {\
|
||||
ESP_LOGE(TAG, "tcpip_adapter is not initialized!");\
|
||||
abort();\
|
||||
}\
|
||||
memset(&msg, 0, sizeof(msg));\
|
||||
msg.tcpip_if = (_if);\
|
||||
msg.mac = (_mac);\
|
||||
@ -168,6 +172,9 @@ typedef struct tcpip_adapter_api_msg_s {
|
||||
}\
|
||||
}while(0)
|
||||
|
||||
typedef struct tcpip_adatper_ip_lost_timer_s {
|
||||
bool timer_running;
|
||||
} tcpip_adapter_ip_lost_timer_t;
|
||||
|
||||
/**
|
||||
* @brief Initialize tcpip adapter
|
||||
@ -177,13 +184,8 @@ typedef struct tcpip_adapter_api_msg_s {
|
||||
void tcpip_adapter_init(void);
|
||||
|
||||
/**
|
||||
* @brief Start an interface with specific MAC and IP
|
||||
* @brief Start the ethernet interface with specific MAC and IP
|
||||
*
|
||||
* softAP or station interface will be initialized, connect WiFi stack with TCPIP stack.
|
||||
*
|
||||
* For softAP interface, DHCP server will be started automatically.
|
||||
*
|
||||
* @param[in] tcpip_if: the interface which we will start
|
||||
* @param[in] mac: set MAC address of this interface
|
||||
* @param[in] ip_info: set IP address of this interface
|
||||
*
|
||||
@ -191,7 +193,37 @@ void tcpip_adapter_init(void);
|
||||
* ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS
|
||||
* ESP_ERR_NO_MEM
|
||||
*/
|
||||
esp_err_t tcpip_adapter_start(tcpip_adapter_if_t tcpip_if, uint8_t *mac, tcpip_adapter_ip_info_t *ip_info);
|
||||
esp_err_t tcpip_adapter_eth_start(uint8_t *mac, tcpip_adapter_ip_info_t *ip_info);
|
||||
|
||||
/**
|
||||
* @brief Start the Wi-Fi station interface with specific MAC and IP
|
||||
*
|
||||
* Station interface will be initialized, connect WiFi stack with TCPIP stack.
|
||||
*
|
||||
* @param[in] mac: set MAC address of this interface
|
||||
* @param[in] ip_info: set IP address of this interface
|
||||
*
|
||||
* @return ESP_OK
|
||||
* ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS
|
||||
* ESP_ERR_NO_MEM
|
||||
*/
|
||||
esp_err_t tcpip_adapter_sta_start(uint8_t *mac, tcpip_adapter_ip_info_t *ip_info);
|
||||
|
||||
/**
|
||||
* @brief Start the Wi-Fi AP interface with specific MAC and IP
|
||||
*
|
||||
* softAP interface will be initialized, connect WiFi stack with TCPIP stack.
|
||||
*
|
||||
* DHCP server will be started automatically.
|
||||
*
|
||||
* @param[in] mac: set MAC address of this interface
|
||||
* @param[in] ip_info: set IP address of this interface
|
||||
*
|
||||
* @return ESP_OK
|
||||
* ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS
|
||||
* ESP_ERR_NO_MEM
|
||||
*/
|
||||
esp_err_t tcpip_adapter_ap_start(uint8_t *mac, tcpip_adapter_ip_info_t *ip_info);
|
||||
|
||||
/**
|
||||
* @brief Stop an interface
|
||||
@ -253,13 +285,44 @@ esp_err_t tcpip_adapter_get_ip_info(tcpip_adapter_if_t tcpip_if, tcpip_adapter_i
|
||||
* This function is mainly used for setting static IP.
|
||||
*
|
||||
* @param[in] tcpip_if: the interface which we want to set IP information
|
||||
* @param[in] ip_info: If successful, IP information will be returned in this argument.
|
||||
* @param[in] ip_info: store the IP information which needs to be set to specified interface
|
||||
*
|
||||
* @return ESP_OK
|
||||
* ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS
|
||||
*/
|
||||
esp_err_t tcpip_adapter_set_ip_info(tcpip_adapter_if_t tcpip_if, tcpip_adapter_ip_info_t *ip_info);
|
||||
|
||||
/**
|
||||
* @brief Get interface's old IP information
|
||||
*
|
||||
* When the interface successfully gets a valid IP from DHCP server or static configured, a copy of
|
||||
* the IP information is set to the old IP information. When IP lost timer expires, the old IP
|
||||
* information is reset to 0.
|
||||
*
|
||||
* @param[in] tcpip_if: the interface which we want to get old IP information
|
||||
* @param[out] ip_info: If successful, IP information will be returned in this argument.
|
||||
*
|
||||
* @return ESP_OK
|
||||
* ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS
|
||||
*/
|
||||
esp_err_t tcpip_adapter_get_old_ip_info(tcpip_adapter_if_t tcpip_if, tcpip_adapter_ip_info_t *ip_info);
|
||||
|
||||
/**
|
||||
* @brief Set interface's old IP information
|
||||
*
|
||||
* When the interface successfully gets a valid IP from DHCP server or static configured, a copy of
|
||||
* the IP information is set to the old IP information. When IP lost timer expires, the old IP
|
||||
* information is reset to 0.
|
||||
*
|
||||
* @param[in] tcpip_if: the interface which we want to set old IP information
|
||||
* @param[in] ip_info: store the IP information which needs to be set to specified interface
|
||||
*
|
||||
* @return ESP_OK
|
||||
* ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS
|
||||
*/
|
||||
esp_err_t tcpip_adapter_set_old_ip_info(tcpip_adapter_if_t tcpip_if, tcpip_adapter_ip_info_t *ip_info);
|
||||
|
||||
|
||||
/**
|
||||
* @brief create interface's linklocal IPv6 information
|
||||
*
|
||||
|
Reference in New Issue
Block a user