components/lwip,esp32: fixes for C++

- put contents of a few headers into c++ guard blocks
- fix off-by-one error in do_global_ctors
- remove system_init from startup code (should be called from main)
This commit is contained in:
Ivan Grokhotkov
2016-09-26 03:05:25 +08:00
parent 10c69514b7
commit b190dc3e9f
4 changed files with 28 additions and 7 deletions

View File

@@ -16,9 +16,7 @@
#define _TCPIP_ADAPTER_H_
#include <stdint.h>
#include "rom/queue.h"
#include "esp_wifi.h"
#define CONFIG_TCPIP_LWIP 1
@@ -28,6 +26,10 @@
#include "lwip/ip_addr.h"
#include "apps/dhcpserver.h"
#ifdef __cplusplus
extern "C" {
#endif
#define IP2STR(ipaddr) ip4_addr1_16(ipaddr), \
ip4_addr2_16(ipaddr), \
ip4_addr3_16(ipaddr), \
@@ -129,5 +131,9 @@ wifi_interface_t tcpip_adapter_get_wifi_if(void *dev);
esp_err_t tcpip_adapter_get_sta_list(struct station_info *sta_info, struct station_list **sta_list);
esp_err_t tcpip_adapter_free_sta_list(struct station_list *sta_list);
#ifdef __cplusplus
}
#endif
#endif /* _TCPIP_ADAPTER_H_ */