Skip to content

Commit f3a1d67

Browse files
committed
stmhal: Enable ubinascii module, weak link to binascii.
1 parent 90cd6cd commit f3a1d67

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

stmhal/mpconfigport.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
#define MICROPY_PY_CMATH (1)
6161
#define MICROPY_PY_IO (1)
6262
#define MICROPY_PY_IO_FILEIO (1)
63+
#define MICROPY_PY_UBINASCII (1)
6364
#define MICROPY_PY_UCTYPES (1)
6465
#define MICROPY_PY_UZLIB (1)
6566
#define MICROPY_PY_UJSON (1)
@@ -82,6 +83,7 @@ extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;
8283
// extra built in modules to add to the list of known ones
8384
extern const struct _mp_obj_module_t pyb_module;
8485
extern const struct _mp_obj_module_t stm_module;
86+
extern const struct _mp_obj_module_t mp_module_ubinascii;
8587
extern const struct _mp_obj_module_t mp_module_ure;
8688
extern const struct _mp_obj_module_t mp_module_uzlib;
8789
extern const struct _mp_obj_module_t mp_module_ujson;
@@ -103,6 +105,7 @@ extern const struct _mp_obj_module_t mp_module_network;
103105
{ MP_OBJ_NEW_QSTR(MP_QSTR_network), (mp_obj_t)&mp_module_network }, \
104106

105107
#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
108+
{ MP_OBJ_NEW_QSTR(MP_QSTR_binascii), (mp_obj_t)&mp_module_ubinascii }, \
106109
{ MP_OBJ_NEW_QSTR(MP_QSTR_re), (mp_obj_t)&mp_module_ure }, \
107110
{ MP_OBJ_NEW_QSTR(MP_QSTR_zlib), (mp_obj_t)&mp_module_uzlib }, \
108111
{ MP_OBJ_NEW_QSTR(MP_QSTR_json), (mp_obj_t)&mp_module_ujson }, \

stmhal/qstrdefsport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Q(elapsed_millis)
7373
Q(elapsed_micros)
7474

7575
// for module weak links
76+
Q(binascii)
7677
Q(re)
7778
Q(zlib)
7879
Q(json)

0 commit comments

Comments
 (0)