stm32: Integrate optional network.PPP.
Can be enabled by a board by enabling `MICROPY_PY_NETWORK_PPP_LWIP`. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
bc952d37fe
commit
a5cc4d4623
2 changed files with 11 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef MICROPY_INCLUDED_STM32_LWIP_LWIPOPTS_H
|
#ifndef MICROPY_INCLUDED_STM32_LWIP_LWIPOPTS_H
|
||||||
#define MICROPY_INCLUDED_STM32_LWIP_LWIPOPTS_H
|
#define MICROPY_INCLUDED_STM32_LWIP_LWIPOPTS_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include "py/mpconfig.h"
|
||||||
|
|
||||||
// This protection is not needed, instead we execute all lwIP code at PendSV priority
|
// This protection is not needed, instead we execute all lwIP code at PendSV priority
|
||||||
#define SYS_ARCH_DECL_PROTECT(lev) do { } while (0)
|
#define SYS_ARCH_DECL_PROTECT(lev) do { } while (0)
|
||||||
|
|
@ -36,6 +36,12 @@
|
||||||
#define LWIP_MDNS_RESPONDER 1
|
#define LWIP_MDNS_RESPONDER 1
|
||||||
#define LWIP_IGMP 1
|
#define LWIP_IGMP 1
|
||||||
|
|
||||||
|
#if MICROPY_PY_LWIP_PPP
|
||||||
|
#define PPP_SUPPORT 1
|
||||||
|
#define PAP_SUPPORT 1
|
||||||
|
#define CHAP_SUPPORT 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#define LWIP_NUM_NETIF_CLIENT_DATA LWIP_MDNS_RESPONDER
|
#define LWIP_NUM_NETIF_CLIENT_DATA LWIP_MDNS_RESPONDER
|
||||||
#define MEMP_NUM_UDP_PCB (4 + LWIP_MDNS_RESPONDER)
|
#define MEMP_NUM_UDP_PCB (4 + LWIP_MDNS_RESPONDER)
|
||||||
#define MEMP_NUM_SYS_TIMEOUT (LWIP_NUM_SYS_TIMEOUT_INTERNAL + LWIP_MDNS_RESPONDER)
|
#define MEMP_NUM_SYS_TIMEOUT (LWIP_NUM_SYS_TIMEOUT_INTERNAL + LWIP_MDNS_RESPONDER)
|
||||||
|
|
@ -77,4 +83,7 @@ extern uint32_t rng_get(void);
|
||||||
|
|
||||||
typedef uint32_t sys_prot_t;
|
typedef uint32_t sys_prot_t;
|
||||||
|
|
||||||
|
// Needed for PPP.
|
||||||
|
#define sys_jiffies sys_now
|
||||||
|
|
||||||
#endif // MICROPY_INCLUDED_STM32_LWIP_LWIPOPTS_H
|
#endif // MICROPY_INCLUDED_STM32_LWIP_LWIPOPTS_H
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,7 @@
|
||||||
#define MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME (1)
|
#define MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME (1)
|
||||||
#define MICROPY_PY_TIME_TIME_TIME_NS (1)
|
#define MICROPY_PY_TIME_TIME_TIME_NS (1)
|
||||||
#define MICROPY_PY_TIME_INCLUDEFILE "ports/stm32/modtime.c"
|
#define MICROPY_PY_TIME_INCLUDEFILE "ports/stm32/modtime.c"
|
||||||
|
#define MICROPY_PY_LWIP_PPP (MICROPY_PY_NETWORK_PPP_LWIP)
|
||||||
#define MICROPY_PY_LWIP_SOCK_RAW (MICROPY_PY_LWIP)
|
#define MICROPY_PY_LWIP_SOCK_RAW (MICROPY_PY_LWIP)
|
||||||
#ifndef MICROPY_PY_MACHINE
|
#ifndef MICROPY_PY_MACHINE
|
||||||
#define MICROPY_PY_MACHINE (1)
|
#define MICROPY_PY_MACHINE (1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue