Skip to content

Commit c6140ad

Browse files
committed
rp2/mpconfigport: Enable os.dupterm and hashlib.sha1 on all boards.
This further aligns the features available on Pico and Pico W boards. os.dupterm is generally useful, but can still be disabled by a board if needed. hashlib.sha1 requires mbedtls for the implementation, but that's always available (due to ucryptolib's requirements). The entire hashlib module can still be disabled by an individual board if needed. Fixes issue adafruit#7881. Signed-off-by: Damien George <[email protected]>
1 parent 4bd4b6a commit c6140ad

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

ports/rp2/mpconfigport.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,14 @@
9292
// Extended modules
9393
#define MICROPY_EPOCH_IS_1970 (1)
9494
#define MICROPY_PY_UOS_INCLUDEFILE "ports/rp2/moduos.c"
95+
#ifndef MICROPY_PY_OS_DUPTERM
96+
#define MICROPY_PY_OS_DUPTERM (1)
97+
#endif
9598
#define MICROPY_PY_UOS_UNAME (1)
9699
#define MICROPY_PY_UOS_URANDOM (1)
97100
#define MICROPY_PY_URE_MATCH_GROUPS (1)
98101
#define MICROPY_PY_URE_MATCH_SPAN_START_END (1)
102+
#define MICROPY_PY_UHASHLIB_SHA1 (1)
99103
#define MICROPY_PY_UCRYPTOLIB (1)
100104
#define MICROPY_PY_UTIME_MP_HAL (1)
101105
#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (rosc_random_u32())
@@ -146,15 +150,9 @@
146150
#ifndef MICROPY_PY_UWEBSOCKET
147151
#define MICROPY_PY_UWEBSOCKET (1)
148152
#endif
149-
#ifndef MICROPY_PY_UHASHLIB_SHA1
150-
#define MICROPY_PY_UHASHLIB_SHA1 (1)
151-
#endif
152153
#ifndef MICROPY_PY_WEBREPL
153154
#define MICROPY_PY_WEBREPL (1)
154155
#endif
155-
#ifndef MICROPY_PY_OS_DUPTERM
156-
#define MICROPY_PY_OS_DUPTERM (1)
157-
#endif
158156
#endif
159157

160158
#if MICROPY_PY_NETWORK_CYW43

0 commit comments

Comments
 (0)