diff --git a/nrf5/Makefile b/nrf5/Makefile index 8b0a37b81b..d6096b9400 100644 --- a/nrf5/Makefile +++ b/nrf5/Makefile @@ -165,6 +165,11 @@ DRIVERS_SRC_C += $(addprefix modules/,\ uos/moduos.c \ utime/modutime.c \ pyb/modpyb.c \ + ubluepy/modubluepy.c \ + ubluepy/ubluepy_peripheral.c \ + ubluepy/ubluepy_service.c \ + ubluepy/ubluepy_characteristic.c \ + ubluepy/ubluepy_uuid.c \ ) #ifeq ($(SD), ) diff --git a/nrf5/mpconfigport.h b/nrf5/mpconfigport.h index 6e710c9553..a9f3f8ee45 100644 --- a/nrf5/mpconfigport.h +++ b/nrf5/mpconfigport.h @@ -235,6 +235,7 @@ extern const struct _mp_obj_module_t mp_module_network; extern const struct _mp_obj_module_t mp_module_lcd_mono_fb; extern const struct _mp_obj_module_t mp_module_display; extern const struct _mp_obj_module_t graphics_module; +extern const struct _mp_obj_module_t mp_module_ubluepy; #if MICROPY_PY_USOCKET #define SOCKET_BUILTIN_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_usocket), (mp_obj_t)&mp_module_usocket }, @@ -263,11 +264,17 @@ extern const struct _mp_obj_module_t graphics_module; #endif #if MICROPY_PY_DISPLAY_GRAPHICS -#define GRAPHICS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_draw), (mp_obj_t)&graphics_module }, +#define GRAPHICS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_draw), (mp_obj_t)&graphics_module }, #else #define GRAPHICS_MODULE #endif +#if MICROPY_PY_UBLUEPY +#define UBLUEPY_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_ubluepy), (mp_obj_t)&mp_module_ubluepy }, +#else +#define UBLUEPY_MODULE +#endif + #if BLUETOOTH_SD extern const struct _mp_obj_module_t ble_module; @@ -283,6 +290,7 @@ extern const struct _mp_obj_module_t ble_module; LCD_MONO_FB_MODULE \ DISPLAY_MODULE \ GRAPHICS_MODULE \ + UBLUEPY_MODULE \ #else diff --git a/nrf5/sdk/nrf5_sdk_conf.h b/nrf5/sdk/nrf5_sdk_conf.h index ab256be1f3..3e898b7aed 100644 --- a/nrf5/sdk/nrf5_sdk_conf.h +++ b/nrf5/sdk/nrf5_sdk_conf.h @@ -17,7 +17,8 @@ #elif (BLUETOOTH_SD == 132) #define MICROPY_PY_BLE (1) -#define MICROPY_PY_BLE_NUS (1) +#define MICROPY_PY_BLE_NUS (0) +#define MICROPY_PY_UBLUEPY (1) #else #error "SD not supported"