|
|
@@ -51,8 +51,10 @@
|
|
|
#define ESP_NETIF_HOSTNAME_MAX_SIZE 32
|
|
|
|
|
|
/**
|
|
|
- * @brief lwip thread safe tcpip function utility macro
|
|
|
+ * @brief lwip thread safe tcpip function utility macros
|
|
|
*/
|
|
|
+#define _RUN_IN_LWIP_TASK(function, netif, param) { return esp_netif_lwip_ipc_call(function, netif, (void *)(param)); }
|
|
|
+
|
|
|
#define _RUN_IN_LWIP_TASK_IF_SUPPORTED(function, netif, param) \
|
|
|
{ \
|
|
|
if (netif->is_ppp_netif) { \
|
|
|
@@ -1121,7 +1123,7 @@ static esp_err_t esp_netif_up_api(esp_netif_api_msg_t *msg)
|
|
|
return ESP_OK;
|
|
|
}
|
|
|
|
|
|
-esp_err_t esp_netif_up(esp_netif_t *esp_netif) _RUN_IN_LWIP_TASK_IF_SUPPORTED(esp_netif_up_api, esp_netif, NULL)
|
|
|
+esp_err_t esp_netif_up(esp_netif_t *esp_netif) _RUN_IN_LWIP_TASK(esp_netif_up_api, esp_netif, NULL)
|
|
|
|
|
|
static esp_err_t esp_netif_down_api(esp_netif_api_msg_t *msg)
|
|
|
{
|
|
|
@@ -1158,7 +1160,7 @@ static esp_err_t esp_netif_down_api(esp_netif_api_msg_t *msg)
|
|
|
return ESP_OK;
|
|
|
}
|
|
|
|
|
|
-esp_err_t esp_netif_down(esp_netif_t *esp_netif) _RUN_IN_LWIP_TASK_IF_SUPPORTED(esp_netif_down_api, esp_netif, NULL)
|
|
|
+esp_err_t esp_netif_down(esp_netif_t *esp_netif) _RUN_IN_LWIP_TASK(esp_netif_down_api, esp_netif, NULL)
|
|
|
|
|
|
bool esp_netif_is_netif_up(esp_netif_t *esp_netif)
|
|
|
{
|