From 471fdae993b6ced3001f10c09fde3c252e87c12f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 13 Apr 2018 10:54:54 -0500 Subject: [PATCH] nrf: Enable binascii, hashlib modules These modules would be very handy to have in order to implement a more robust replacement for ampy. It costs around 2KiB of text and no data or bss. 'binascii' has base64 encoding, which can be used to create a fully 8-bit-clean transport above the slightly cooked serial connection of these boards. 'hashlib' is a bit less critical, but I have found it handy to be able to robustly checksum remote files. I see this as only being useful on ports which don't have USB block device support, so atmel-samd doesn't need it. These modules are already on esp8266 so I think nrf52 seems like the only one that needs it. --- ports/nrf/mpconfigport.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 99ccdcae02..669860ef04 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -112,7 +112,7 @@ #define MICROPY_PY_IO (0) #define MICROPY_PY_IO_FILEIO (0) #define MICROPY_PY_UERRNO (0) -#define MICROPY_PY_UBINASCII (0) +#define MICROPY_PY_UBINASCII (1) #define MICROPY_PY_URANDOM (0) #define MICROPY_PY_URANDOM_EXTRA_FUNCS (0) #define MICROPY_PY_UCTYPES (0) @@ -120,7 +120,7 @@ #define MICROPY_PY_UJSON (0) #define MICROPY_PY_URE (0) #define MICROPY_PY_UHEAPQ (0) -#define MICROPY_PY_UHASHLIB (0) +#define MICROPY_PY_UHASHLIB (1) #define MICROPY_PY_UTIME_MP_HAL (1) #define MICROPY_PY_STRUCT (0) #define MICROPY_PY_MACHINE (1)