mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-12 10:06:32 +02:00
examples: common component initialization code to use new esp_netif
instead of tcpip_adapter * Original commit: espressif/esp-idf@21464465ea
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
53e2aa3241
commit
879a6cdfa3
@ -14,14 +14,14 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "tcpip_adapter.h"
|
||||
#include "esp_netif.h"
|
||||
|
||||
#ifdef CONFIG_EXAMPLE_CONNECT_ETHERNET
|
||||
#define EXAMPLE_INTERFACE TCPIP_ADAPTER_IF_ETH
|
||||
#define EXAMPLE_INTERFACE get_example_netif()
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_EXAMPLE_CONNECT_WIFI
|
||||
#define EXAMPLE_INTERFACE TCPIP_ADAPTER_IF_STA
|
||||
#define EXAMPLE_INTERFACE get_example_netif()
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -54,6 +54,11 @@ esp_err_t example_disconnect(void);
|
||||
*/
|
||||
esp_err_t example_configure_stdin_stdout(void);
|
||||
|
||||
/**
|
||||
* @brief Returns esp-netif pointer created by example_connect()
|
||||
*
|
||||
*/
|
||||
esp_netif_t *get_example_netif(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user