1 #ifndef MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_LWIPOPTS_H 2 #define MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_LWIPOPTS_H 3 4 #include <py/mpconfig.h> 5 #include <py/misc.h> 6 #include <py/mphal.h> 7 8 // We're running without an OS for this port. We don't provide any services except light protection. 9 #define NO_SYS 1 10 11 #define SYS_LIGHTWEIGHT_PROT 1 12 #include <stdint.h> 13 typedef uint32_t sys_prot_t; 14 15 #define TCP_LISTEN_BACKLOG 1 16 17 // We'll put these into a proper ifdef once somebody implements an ethernet driver 18 #define LWIP_ARP 0 19 #define LWIP_ETHERNET 0 20 21 #define LWIP_DNS 1 22 23 #define LWIP_NETCONN 0 24 #define LWIP_SOCKET 0 25 26 #ifdef MICROPY_PY_LWIP_SLIP 27 #define LWIP_HAVE_SLIPIF 1 28 #endif 29 30 // For now, we can simply define this as a macro for the timer code. But this function isn't 31 // universal and other ports will need to do something else. It may be necessary to move 32 // things like this into a port-provided header file. 33 #define sys_now mp_hal_ticks_ms 34 35 #endif // MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_LWIPOPTS_H 36