Skip to content

Commit

Permalink
rp2/mpconfigport: Enable os.dupterm and hashlib.sha1 on all boards.
Browse files Browse the repository at this point in the history
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 <damien@micropython.org>
  • Loading branch information
dpgeorge committed Feb 17, 2023
1 parent 4bd4b6a commit c6140ad
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions ports/rp2/mpconfigport.h
Expand Up @@ -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())
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c6140ad

Please sign in to comment.