From 48feb8ac6e80ef4d0489bedee4c9f68f96015967 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 17 Oct 2016 13:17:19 +1100 Subject: [PATCH] stmhal: Enable str.center(), str.[r]partition() and builtin compile(). Also adds "machine" to the list of modules that the parser can search for constants. --- stmhal/mpconfigport.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stmhal/mpconfigport.h b/stmhal/mpconfigport.h index 8979ad8dca..264db3029d 100644 --- a/stmhal/mpconfigport.h +++ b/stmhal/mpconfigport.h @@ -67,10 +67,13 @@ #define MICROPY_USE_INTERNAL_ERRNO (1) #define MICROPY_PY_FUNCTION_ATTRS (1) #define MICROPY_PY_BUILTINS_STR_UNICODE (1) +#define MICROPY_PY_BUILTINS_STR_CENTER (1) +#define MICROPY_PY_BUILTINS_STR_PARTITION (1) #define MICROPY_PY_BUILTINS_STR_SPLITLINES (1) #define MICROPY_PY_BUILTINS_MEMORYVIEW (1) #define MICROPY_PY_BUILTINS_FROZENSET (1) #define MICROPY_PY_BUILTINS_EXECFILE (1) +#define MICROPY_PY_BUILTINS_COMPILE (1) #define MICROPY_PY_ALL_SPECIAL_METHODS (1) #define MICROPY_PY_MICROPYTHON_MEM_INFO (1) #define MICROPY_PY_ARRAY_SLICE_ASSIGN (1) @@ -177,6 +180,7 @@ extern const struct _mp_obj_module_t mp_module_network; // extra constants #define MICROPY_PORT_CONSTANTS \ { MP_OBJ_NEW_QSTR(MP_QSTR_umachine), (mp_obj_t)&machine_module }, \ + { MP_OBJ_NEW_QSTR(MP_QSTR_machine), (mp_obj_t)&machine_module }, \ { MP_OBJ_NEW_QSTR(MP_QSTR_pyb), (mp_obj_t)&pyb_module }, \ { MP_OBJ_NEW_QSTR(MP_QSTR_stm), (mp_obj_t)&stm_module }, \