diff options
author | Angus Gratton <angus@redyak.com.au> | 2025-01-28 11:54:57 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-02-11 16:11:33 +1100 |
commit | bab099826e956bcc000b8a3c45b144c97d870fe2 (patch) | |
tree | 21f40b98a957022d153477b5183affc921655481 | |
parent | 12dd9cb74598bb0144cb7ac7dcbc5f5631372afa (diff) | |
download | micropython-bab099826e956bcc000b8a3c45b144c97d870fe2.tar.gz micropython-bab099826e956bcc000b8a3c45b144c97d870fe2.zip |
docs: Note which ports have default or optional network.PPP support.
Also add the default values of these macros to the respective
`mpconfigport.h` files, to improve discoverability.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
-rw-r--r-- | docs/library/network.PPP.rst | 7 | ||||
-rw-r--r-- | ports/rp2/mpconfigport.h | 4 | ||||
-rw-r--r-- | ports/stm32/mpconfigport.h | 14 |
3 files changed, 21 insertions, 4 deletions
diff --git a/docs/library/network.PPP.rst b/docs/library/network.PPP.rst index 17a8d1c1cd..15ab1da193 100644 --- a/docs/library/network.PPP.rst +++ b/docs/library/network.PPP.rst @@ -5,7 +5,12 @@ class PPP -- create network connections over serial PPP ======================================================= This class allows you to create a network connection over a serial port using -the PPP protocol. It is only available on selected ports and boards. +the PPP protocol. + +.. note:: Currently only the esp32 port has PPP support enabled in the default + firmware build. PPP support can be enabled in custom builds of the + stm32 and rp2 ports by enabling networking support and setting + ``MICROPY_PY_NETWORK_PPP_LWIP`` to 1. Example usage:: diff --git a/ports/rp2/mpconfigport.h b/ports/rp2/mpconfigport.h index bc289bcbf9..fe8287ba1d 100644 --- a/ports/rp2/mpconfigport.h +++ b/ports/rp2/mpconfigport.h @@ -212,6 +212,10 @@ #ifndef MICROPY_PY_WEBREPL #define MICROPY_PY_WEBREPL (1) #endif + +#ifndef MICROPY_PY_NETWORK_PPP_LWIP +#define MICROPY_PY_NETWORK_PPP_LWIP (0) +#endif #endif #if MICROPY_PY_NETWORK_CYW43 diff --git a/ports/stm32/mpconfigport.h b/ports/stm32/mpconfigport.h index dc0a767fb0..2b57446ee8 100644 --- a/ports/stm32/mpconfigport.h +++ b/ports/stm32/mpconfigport.h @@ -146,9 +146,6 @@ #define MICROPY_HW_SOFTSPI_MAX_BAUDRATE (HAL_RCC_GetSysClockFreq() / 48) #define MICROPY_PY_WEBSOCKET (MICROPY_PY_LWIP) #define MICROPY_PY_WEBREPL (MICROPY_PY_LWIP) -#ifndef MICROPY_PY_SOCKET -#define MICROPY_PY_SOCKET (1) -#endif #ifndef MICROPY_PY_NETWORK #define MICROPY_PY_NETWORK (1) #endif @@ -156,6 +153,17 @@ #define MICROPY_PY_ONEWIRE (1) #endif +// optional network features +#if MICROPY_PY_NETWORK +#ifndef MICROPY_PY_SOCKET +#define MICROPY_PY_SOCKET (1) +#endif + +#ifndef MICROPY_PY_NETWORK_PPP_LWIP +#define MICROPY_PY_NETWORK_PPP_LWIP (0) +#endif +#endif + // fatfs configuration used in ffconf.h #define MICROPY_FATFS_ENABLE_LFN (2) #define MICROPY_FATFS_LFN_CODE_PAGE 437 /* 1=SFN/ANSI 437=LFN/U.S.(OEM) */ |