diff options
Diffstat (limited to 'py')
-rw-r--r-- | py/mpstate.h | 4 | ||||
-rw-r--r-- | py/py.mk | 1 | ||||
-rw-r--r-- | py/runtime.c | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/py/mpstate.h b/py/mpstate.h index 0f9c56d2c..ab7d8c51b 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -189,6 +189,10 @@ typedef struct _mp_state_vm_t { struct _mp_vfs_mount_t *vfs_mount_table; #endif + #if MICROPY_PY_BLUETOOTH + mp_obj_t bluetooth; + #endif + // // END ROOT POINTER SECTION //////////////////////////////////////////////////////////// @@ -174,6 +174,7 @@ PY_EXTMOD_O_BASENAME = \ extmod/machine_pulse.o \ extmod/machine_i2c.o \ extmod/machine_spi.o \ + extmod/modbluetooth.o \ extmod/modussl_axtls.o \ extmod/modussl_mbedtls.o \ extmod/modurandom.o \ diff --git a/py/runtime.c b/py/runtime.c index ecbdff2ba..2657e7cc2 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -131,6 +131,10 @@ void mp_init(void) { MP_STATE_THREAD(current_code_state) = NULL; #endif + #if MICROPY_PY_BLUETOOTH + MP_STATE_VM(bluetooth) = MP_OBJ_NULL; + #endif + #if MICROPY_PY_THREAD_GIL mp_thread_mutex_init(&MP_STATE_VM(gil_mutex)); #endif |