mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 04:34:31 +02:00
esp_netif: added missing C++ guards
Closes https://github.com/espressif/esp-idf/issues/4389
This commit is contained in:
@@ -22,6 +22,10 @@
|
||||
#include "esp_netif_types.h"
|
||||
#include "esp_netif_defaults.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//
|
||||
// Note: tcpip_adapter legacy API has to be included by default to provide full compatibility
|
||||
// for applications that used tcpip_adapter API without explicit inclusion of tcpip_adapter.h
|
||||
@@ -736,4 +740,8 @@ size_t esp_netif_get_nr_of_ifs(void);
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ESP_NETIF_H_ */
|
||||
|
@@ -15,6 +15,10 @@
|
||||
#ifndef _ESP_NETIF_DEFAULTS_H
|
||||
#define _ESP_NETIF_DEFAULTS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//
|
||||
// Macros to assemble master configs with partial configs from netif, stack and driver
|
||||
//
|
||||
@@ -85,4 +89,8 @@ extern const esp_netif_inherent_config_t _g_esp_netif_inherent_sta_config;
|
||||
extern const esp_netif_inherent_config_t _g_esp_netif_inherent_ap_config;
|
||||
extern const esp_netif_inherent_config_t _g_esp_netif_inherent_eth_config;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //_ESP_NETIF_DEFAULTS_H
|
||||
|
@@ -16,6 +16,11 @@
|
||||
#define _ESP_NETIF_IP_ADDR_H_
|
||||
|
||||
#include <machine/endian.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
#define esp_netif_htonl(x) ((uint32_t)(x))
|
||||
#else
|
||||
@@ -95,4 +100,8 @@ typedef struct _ip_addr {
|
||||
uint8_t type;
|
||||
} esp_ip_addr_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //_ESP_NETIF_IP_ADDR_H_
|
||||
|
@@ -15,6 +15,10 @@
|
||||
#ifndef _ESP_NETIF_NET_STACK_H_
|
||||
#define _ESP_NETIF_NET_STACK_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//
|
||||
// Network stack API: This ESP-NETIF API are supposed to be called only from internals of TCP/IP stack
|
||||
//
|
||||
@@ -76,4 +80,8 @@ void esp_netif_free_rx_buffer(void *esp_netif, void* buffer);
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //_ESP_NETIF_NET_STACK_H_
|
||||
|
@@ -17,6 +17,10 @@
|
||||
|
||||
#include "esp_netif_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief station list info element
|
||||
*/
|
||||
@@ -59,4 +63,9 @@ esp_err_t esp_netif_get_sta_list(const wifi_sta_list_t *wifi_sta_list, esp_netif
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //_ESP_NETIF_STA_LIST_H_
|
||||
|
@@ -15,6 +15,10 @@
|
||||
#ifndef _ESP_NETIF_TYPES_H_
|
||||
#define _ESP_NETIF_TYPES_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Definition of ESP-NETIF based errors
|
||||
*/
|
||||
@@ -198,4 +202,8 @@ struct esp_netif_config {
|
||||
*/
|
||||
typedef esp_err_t (*esp_netif_receive_t)(esp_netif_t *esp_netif, void *buffer, size_t len, void *eb);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _ESP_NETIF_TYPES_H_
|
Reference in New Issue
Block a user