mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-18 13:02:21 +02:00
examples: added ESP-NETIF L2 TAP example
* Original commit: espressif/esp-idf@fcdb0306d0
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
87c269911d
commit
00e7675913
@ -479,6 +479,7 @@ static void eth_stop(void)
|
|||||||
ESP_ERROR_CHECK(esp_eth_stop(s_eth_handle));
|
ESP_ERROR_CHECK(esp_eth_stop(s_eth_handle));
|
||||||
ESP_ERROR_CHECK(esp_eth_del_netif_glue(s_eth_glue));
|
ESP_ERROR_CHECK(esp_eth_del_netif_glue(s_eth_glue));
|
||||||
ESP_ERROR_CHECK(esp_eth_driver_uninstall(s_eth_handle));
|
ESP_ERROR_CHECK(esp_eth_driver_uninstall(s_eth_handle));
|
||||||
|
s_eth_handle = NULL;
|
||||||
ESP_ERROR_CHECK(s_phy->del(s_phy));
|
ESP_ERROR_CHECK(s_phy->del(s_phy));
|
||||||
ESP_ERROR_CHECK(s_mac->del(s_mac));
|
ESP_ERROR_CHECK(s_mac->del(s_mac));
|
||||||
|
|
||||||
@ -486,6 +487,11 @@ static void eth_stop(void)
|
|||||||
s_example_esp_netif = NULL;
|
s_example_esp_netif = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
esp_eth_handle_t get_example_eth_handle(void)
|
||||||
|
{
|
||||||
|
return s_eth_handle;
|
||||||
|
}
|
||||||
|
|
||||||
#endif // CONFIG_EXAMPLE_CONNECT_ETHERNET
|
#endif // CONFIG_EXAMPLE_CONNECT_ETHERNET
|
||||||
|
|
||||||
esp_netif_t *get_example_netif(void)
|
esp_netif_t *get_example_netif(void)
|
||||||
|
@ -78,6 +78,15 @@ esp_netif_t *get_example_netif(void);
|
|||||||
*/
|
*/
|
||||||
esp_netif_t *get_example_netif_from_desc(const char *desc);
|
esp_netif_t *get_example_netif_from_desc(const char *desc);
|
||||||
|
|
||||||
|
#ifdef CONFIG_EXAMPLE_CONNECT_ETHERNET
|
||||||
|
/**
|
||||||
|
* @brief Get the example Ethernet driver handle
|
||||||
|
*
|
||||||
|
* @return esp_eth_handle_t
|
||||||
|
*/
|
||||||
|
esp_eth_handle_t get_example_eth_handle(void);
|
||||||
|
#endif // CONFIG_EXAMPLE_CONNECT_ETHERNET
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user