esp_netif/tcpip_adapter: declare functions extern "C"

Merges https://github.com/espressif/esp-idf/pull/4408
This commit is contained in:
Thomas Schaub 2019-11-27 00:20:41 +01:00 committed by David Cermak
parent ac47c74ec4
commit f21107d12d
3 changed files with 25 additions and 0 deletions

View file

@ -23,6 +23,10 @@
#include "tcpip_adapter_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief tcpip adapter legacy init. It is used only to set the compatibility mode of esp-netif, which
* will enable backward compatibility of esp-netif.
@ -245,4 +249,8 @@ esp_err_t tcpip_adapter_get_hostname(tcpip_adapter_if_t tcpip_if, const char **h
*/
esp_err_t tcpip_adapter_set_default_wifi_handlers(void);
#ifdef __cplusplus
} // extern "C"
#endif
#endif //_TCPIP_ADAPTER_H_

View file

@ -15,6 +15,10 @@
#ifndef _TCPIP_ADAPTER_COMPAT_H_
#define _TCPIP_ADAPTER_COMPAT_H_
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief This function is called from ethernet driver init code to facilitate
* autostart fo the driver in backward compatible tcpip_adapter way
@ -54,4 +58,8 @@ esp_err_t tcpip_adapter_set_default_wifi_handlers(void);
*/
esp_err_t tcpip_adapter_clear_default_wifi_handlers(void);
#ifdef __cplusplus
} // extern "C"
#endif
#endif //_TCPIP_ADAPTER_COMPAT_H_

View file

@ -18,6 +18,11 @@
#include "lwip/ip_addr.h"
#include "dhcpserver/dhcpserver.h"
#include "esp_netif_sta_list.h"
#ifdef __cplusplus
extern "C" {
#endif
//
// Define compatible types if tcpip_adapter interface used
//
@ -70,4 +75,8 @@ typedef esp_netif_dns_info_t tcpip_adapter_dns_info_t;
typedef esp_netif_sta_list_t tcpip_adapter_sta_list_t;
typedef esp_netif_sta_info_t tcpip_adapter_sta_info_t;
#ifdef __cplusplus
} // extern "C"
#endif
#endif // _TCPIP_ADAPTER_TYPES_H_