Skip to content

Commit bab0998

Browse files
projectgusdpgeorge
authored andcommitted
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 <[email protected]>
1 parent 12dd9cb commit bab0998

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

docs/library/network.PPP.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ class PPP -- create network connections over serial PPP
55
=======================================================
66

77
This class allows you to create a network connection over a serial port using
8-
the PPP protocol. It is only available on selected ports and boards.
8+
the PPP protocol.
9+
10+
.. note:: Currently only the esp32 port has PPP support enabled in the default
11+
firmware build. PPP support can be enabled in custom builds of the
12+
stm32 and rp2 ports by enabling networking support and setting
13+
``MICROPY_PY_NETWORK_PPP_LWIP`` to 1.
914

1015
Example usage::
1116

ports/rp2/mpconfigport.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@
212212
#ifndef MICROPY_PY_WEBREPL
213213
#define MICROPY_PY_WEBREPL (1)
214214
#endif
215+
216+
#ifndef MICROPY_PY_NETWORK_PPP_LWIP
217+
#define MICROPY_PY_NETWORK_PPP_LWIP (0)
218+
#endif
215219
#endif
216220

217221
#if MICROPY_PY_NETWORK_CYW43

ports/stm32/mpconfigport.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,24 @@
146146
#define MICROPY_HW_SOFTSPI_MAX_BAUDRATE (HAL_RCC_GetSysClockFreq() / 48)
147147
#define MICROPY_PY_WEBSOCKET (MICROPY_PY_LWIP)
148148
#define MICROPY_PY_WEBREPL (MICROPY_PY_LWIP)
149-
#ifndef MICROPY_PY_SOCKET
150-
#define MICROPY_PY_SOCKET (1)
151-
#endif
152149
#ifndef MICROPY_PY_NETWORK
153150
#define MICROPY_PY_NETWORK (1)
154151
#endif
155152
#ifndef MICROPY_PY_ONEWIRE
156153
#define MICROPY_PY_ONEWIRE (1)
157154
#endif
158155

156+
// optional network features
157+
#if MICROPY_PY_NETWORK
158+
#ifndef MICROPY_PY_SOCKET
159+
#define MICROPY_PY_SOCKET (1)
160+
#endif
161+
162+
#ifndef MICROPY_PY_NETWORK_PPP_LWIP
163+
#define MICROPY_PY_NETWORK_PPP_LWIP (0)
164+
#endif
165+
#endif
166+
159167
// fatfs configuration used in ffconf.h
160168
#define MICROPY_FATFS_ENABLE_LFN (2)
161169
#define MICROPY_FATFS_LFN_CODE_PAGE 437 /* 1=SFN/ANSI 437=LFN/U.S.(OEM) */

0 commit comments

Comments
 (0)