File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 4747// MICROPY_PY_UJSON depends on MICROPY_PY_IO
4848#define MICROPY_PY_IO (0)
4949#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0)
50+ #define MICROPY_PY_UBINASCII (0)
5051#define MICROPY_PY_UJSON (0)
5152#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
5253#define MICROPY_PY_UERRNO_LIST \
Original file line number Diff line number Diff line change @@ -197,6 +197,9 @@ typedef long mp_off_t;
197197#ifndef MICROPY_PY_COLLECTIONS_ORDEREDDICT
198198#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (CIRCUITPY_FULL_BUILD)
199199#endif
200+ #ifndef MICROPY_PY_UBINASCII
201+ #define MICROPY_PY_UBINASCII (CIRCUITPY_FULL_BUILD)
202+ #endif
200203// Opposite setting is deliberate.
201204#define MICROPY_PY_UERRNO_ERRORCODE (!CIRCUITPY_FULL_BUILD)
202205#ifndef MICROPY_PY_URE
@@ -699,6 +702,12 @@ extern const struct _mp_obj_module_t ustack_module;
699702#endif
700703
701704// These modules are not yet in shared-bindings, but we prefer the non-uxxx names.
705+ #if MICROPY_PY_UBINASCII
706+ #define BINASCII_MODULE { MP_ROM_QSTR(MP_QSTR_binascii), MP_ROM_PTR(&mp_module_ubinascii) },
707+ #else
708+ #define BINASCII_MODULE
709+ #endif
710+
702711#if MICROPY_PY_UERRNO
703712#define ERRNO_MODULE { MP_ROM_QSTR(MP_QSTR_errno), MP_ROM_PTR(&mp_module_uerrno) },
704713#else
@@ -770,6 +779,7 @@ extern const struct _mp_obj_module_t wifi_module;
770779 AUDIOMIXER_MODULE \
771780 AUDIOMP3_MODULE \
772781 AUDIOPWMIO_MODULE \
782+ BINASCII_MODULE \
773783 BITBANGIO_MODULE \
774784 BLEIO_MODULE \
775785 BOARD_MODULE \
Original file line number Diff line number Diff line change @@ -239,7 +239,12 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
239239 { MP_ROM_QSTR (MP_QSTR_hashlib ), MP_ROM_PTR (& mp_module_uhashlib ) },
240240#endif
241241#if MICROPY_PY_UBINASCII
242- { MP_ROM_QSTR (MP_QSTR_binascii ), MP_ROM_PTR (& mp_module_ubinascii ) },
242+ #if CIRCUITPY
243+ // CircuitPython: Defined in MICROPY_PORT_BUILTIN_MODULES, so not defined here.
244+ // TODO: move to shared-bindings/
245+ #else
246+ { MP_ROM_QSTR (MP_QSTR_ubinascii ), MP_ROM_PTR (& mp_module_ubinascii ) },
247+ #endif
243248#endif
244249#if MICROPY_PY_URANDOM
245250 { MP_ROM_QSTR (MP_QSTR_urandom ), MP_ROM_PTR (& mp_module_urandom ) },
You can’t perform that action at this time.
0 commit comments