Add ESP8266 example

This commit is contained in:
cpq committed 2020-12-27 01:29:42 +00:00
1 parent 7d1ef2ffe8
commit 71a22adc06
13 files changed
+194 -51

No files matched your search

+2 -17
View File
@@ -3,25 +3,10 @@
#if MG_ARCH == MG_ARCH_ESP8266
#include <dirent.h>
#include <esp_system.h>
#include <netdb.h>
#include <stdbool.h>
#include <sys/time.h>
#include <user_interface.h>
#define MG_DIRSEP '/'
#ifndef PATH_MAX
#define PATH_MAX 128
#endif
#define MG_ENABLE_LWIP 1
#define LWIP_TIMEVAL_PRIVATE 0 // struct timeval is defined in sys/time.h
#if LWIP_SOCKET
#include <lwip/sockets.h>
#else
#undef LWIP_SOCKET
#define LWIP_SOCKET 1
#include <lwip/sockets.h> // Source sockaddr_in anyway
#undef LWIP_SOCKET
#define LWIP_SOCKET 0
#endif
#endif