mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-01 04:50:58 +02:00
IDF master 1d7068e4b (#5257)
esp-dsp: master 7cc5073 esp-face: master 420fc7e esp-rainmaker: f1b82c7 esp32-camera: master 7a06a7e esp_littlefs: master b58f00c
This commit is contained in:
@ -237,6 +237,54 @@ void esp_netif_action_disconnected(void *esp_netif, esp_event_base_t base, int32
|
||||
*/
|
||||
void esp_netif_action_got_ip(void *esp_netif, esp_event_base_t base, int32_t event_id, void *data);
|
||||
|
||||
/**
|
||||
* @brief Default building block for network interface action upon IPv6 multicast group join
|
||||
*
|
||||
* @note This API can be directly used as event handler
|
||||
*
|
||||
* @param[in] esp_netif Handle to esp-netif instance
|
||||
* @param base
|
||||
* @param event_id
|
||||
* @param data
|
||||
*/
|
||||
void esp_netif_action_join_ip6_multicast_group(void *esp_netif, esp_event_base_t base, int32_t event_id, void *data);
|
||||
|
||||
/**
|
||||
* @brief Default building block for network interface action upon IPv6 multicast group leave
|
||||
*
|
||||
* @note This API can be directly used as event handler
|
||||
*
|
||||
* @param[in] esp_netif Handle to esp-netif instance
|
||||
* @param base
|
||||
* @param event_id
|
||||
* @param data
|
||||
*/
|
||||
void esp_netif_action_leave_ip6_multicast_group(void *esp_netif, esp_event_base_t base, int32_t event_id, void *data);
|
||||
|
||||
/**
|
||||
* @brief Default building block for network interface action upon IPv6 address added by the underlying stack
|
||||
*
|
||||
* @note This API can be directly used as event handler
|
||||
*
|
||||
* @param[in] esp_netif Handle to esp-netif instance
|
||||
* @param base
|
||||
* @param event_id
|
||||
* @param data
|
||||
*/
|
||||
void esp_netif_action_add_ip6_address(void *esp_netif, esp_event_base_t base, int32_t event_id, void *data);
|
||||
|
||||
/**
|
||||
* @brief Default building block for network interface action upon IPv6 address removed by the underlying stack
|
||||
*
|
||||
* @note This API can be directly used as event handler
|
||||
*
|
||||
* @param[in] esp_netif Handle to esp-netif instance
|
||||
* @param base
|
||||
* @param event_id
|
||||
* @param data
|
||||
*/
|
||||
void esp_netif_action_remove_ip6_address(void *esp_netif, esp_event_base_t base, int32_t event_id, void *data);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -73,6 +73,18 @@ extern "C" {
|
||||
.route_prio = 20 \
|
||||
};
|
||||
|
||||
#define ESP_NETIF_INHERENT_DEFAULT_OPENTHREAD() \
|
||||
{ \
|
||||
.flags = 0, \
|
||||
ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_EMPTY(mac) \
|
||||
ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_EMPTY(ip_info) \
|
||||
.get_ip_event = 0, \
|
||||
.lost_ip_event = 0, \
|
||||
.if_key = "OT_DEF", \
|
||||
.if_desc = "openthread", \
|
||||
.route_prio = 15 \
|
||||
};
|
||||
|
||||
#define ESP_NETIF_INHERENT_DEFAULT_SLIP() \
|
||||
{ \
|
||||
.flags = ESP_NETIF_FLAG_IS_SLIP, \
|
||||
@ -85,6 +97,7 @@ extern "C" {
|
||||
.route_prio = 16 \
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief Default configuration reference of ethernet interface
|
||||
*/
|
||||
@ -162,12 +175,12 @@ extern "C" {
|
||||
#define ESP_NETIF_BASE_DEFAULT_SLIP &_g_esp_netif_inherent_slip_config
|
||||
|
||||
|
||||
|
||||
#define ESP_NETIF_NETSTACK_DEFAULT_ETH _g_esp_netif_netstack_default_eth
|
||||
#define ESP_NETIF_NETSTACK_DEFAULT_WIFI_STA _g_esp_netif_netstack_default_wifi_sta
|
||||
#define ESP_NETIF_NETSTACK_DEFAULT_WIFI_AP _g_esp_netif_netstack_default_wifi_ap
|
||||
#define ESP_NETIF_NETSTACK_DEFAULT_PPP _g_esp_netif_netstack_default_ppp
|
||||
#define ESP_NETIF_NETSTACK_DEFAULT_SLIP _g_esp_netif_netstack_default_slip
|
||||
#define ESP_NETIF_NETSTACK_DEFAULT_OPENTHREAD _g_esp_netif_netstack_default_openthread
|
||||
|
||||
//
|
||||
// Include default network stacks configs
|
||||
@ -194,6 +207,27 @@ extern const esp_netif_inherent_config_t _g_esp_netif_inherent_slip_config;
|
||||
|
||||
extern const esp_netif_ip_info_t _g_esp_netif_soft_ap_ip;
|
||||
|
||||
#if CONFIG_OPENTHREAD_ENABLED
|
||||
/**
|
||||
* @brief Default configuration reference of SLIP client
|
||||
*/
|
||||
#define ESP_NETIF_DEFAULT_OPENTHREAD() \
|
||||
{ \
|
||||
.base = ESP_NETIF_BASE_DEFAULT_OPENTHREAD, \
|
||||
.driver = NULL, \
|
||||
.stack = ESP_NETIF_NETSTACK_DEFAULT_OPENTHREAD, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Default base config (esp-netif inherent) of openthread interface
|
||||
*/
|
||||
#define ESP_NETIF_BASE_DEFAULT_OPENTHREAD &_g_esp_netif_inherent_openthread_config
|
||||
|
||||
extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_openthread;
|
||||
extern const esp_netif_inherent_config_t _g_esp_netif_inherent_openthread_config;
|
||||
|
||||
#endif // CONFIG_OPENTHREAD_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -33,6 +33,8 @@ extern "C" {
|
||||
#define ESP_ERR_ESP_NETIF_DRIVER_ATTACH_FAILED ESP_ERR_ESP_NETIF_BASE + 0x08
|
||||
#define ESP_ERR_ESP_NETIF_INIT_FAILED ESP_ERR_ESP_NETIF_BASE + 0x09
|
||||
#define ESP_ERR_ESP_NETIF_DNS_NOT_CONFIGURED ESP_ERR_ESP_NETIF_BASE + 0x0A
|
||||
#define ESP_ERR_ESP_NETIF_MLD6_FAILED ESP_ERR_ESP_NETIF_BASE + 0x0B
|
||||
#define ESP_ERR_ESP_NETIF_IP6_ADDR_FAILED ESP_ERR_ESP_NETIF_BASE + 0x0C
|
||||
|
||||
|
||||
/** @brief Type of esp_netif_object server */
|
||||
@ -125,6 +127,12 @@ typedef struct {
|
||||
int ip_index; /*!< IPv6 address index */
|
||||
} ip_event_got_ip6_t;
|
||||
|
||||
/** Event structure for ADD_IP6 event */
|
||||
typedef struct {
|
||||
esp_ip6_addr_t addr; /*!< The address to be added to the interface */
|
||||
bool preferred; /*!< The default preference of the address */
|
||||
} ip_event_add_ip6_t;
|
||||
|
||||
/** Event structure for IP_EVENT_AP_STAIPASSIGNED event */
|
||||
typedef struct {
|
||||
esp_ip4_addr_t ip; /*!< IP address which was assigned to the station */
|
||||
|
Reference in New Issue
Block a user