From c6140ad0d4add2742a9a7645e74a7d2a3affabe7 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 17 Feb 2023 13:43:03 +1100 Subject: [PATCH] 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 #7881. Signed-off-by: Damien George --- ports/rp2/mpconfigport.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ports/rp2/mpconfigport.h b/ports/rp2/mpconfigport.h index a21c141e4b..35bc22e55a 100644 --- a/ports/rp2/mpconfigport.h +++ b/ports/rp2/mpconfigport.h @@ -92,10 +92,14 @@ // Extended modules #define MICROPY_EPOCH_IS_1970 (1) #define MICROPY_PY_UOS_INCLUDEFILE "ports/rp2/moduos.c" +#ifndef MICROPY_PY_OS_DUPTERM +#define MICROPY_PY_OS_DUPTERM (1) +#endif #define MICROPY_PY_UOS_UNAME (1) #define MICROPY_PY_UOS_URANDOM (1) #define MICROPY_PY_URE_MATCH_GROUPS (1) #define MICROPY_PY_URE_MATCH_SPAN_START_END (1) +#define MICROPY_PY_UHASHLIB_SHA1 (1) #define MICROPY_PY_UCRYPTOLIB (1) #define MICROPY_PY_UTIME_MP_HAL (1) #define MICROPY_PY_URANDOM_SEED_INIT_FUNC (rosc_random_u32()) @@ -146,15 +150,9 @@ #ifndef MICROPY_PY_UWEBSOCKET #define MICROPY_PY_UWEBSOCKET (1) #endif -#ifndef MICROPY_PY_UHASHLIB_SHA1 -#define MICROPY_PY_UHASHLIB_SHA1 (1) -#endif #ifndef MICROPY_PY_WEBREPL #define MICROPY_PY_WEBREPL (1) #endif -#ifndef MICROPY_PY_OS_DUPTERM -#define MICROPY_PY_OS_DUPTERM (1) -#endif #endif #if MICROPY_PY_NETWORK_CYW43