126126
127127#define MICROPY_KBD_EXCEPTION (1)
128128
129- #ifndef MICROPY_PY_HW_RNG
130- #define MICROPY_PY_HW_RNG (1)
131- #endif
132-
133129#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
134130#define MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE (0)
135131
136132// Scan gamepad every 32ms
137133#define CIRCUITPY_GAMEPAD_TICKS 0x1f
138134
139- // if sdk is in use, import configuration
140135#if BLUETOOTH_SD
141- #include "bluetooth_conf.h"
136+ #define MICROPY_PY_BLEIO (1)
137+ #define MICROPY_PY_BLE_NUS (0)
138+ #define MICROPY_PY_UBLUEPY (1)
139+ #define MICROPY_PY_UBLUEPY_PERIPHERAL (1)
140+ #define MICROPY_PY_UBLUEPY_CENTRAL (1)
141+ #define BLUETOOTH_WEBBLUETOOTH_REPL (0)
142142#endif
143143
144- #ifndef MICROPY_PY_UBLUEPY
145- #define MICROPY_PY_UBLUEPY (0)
144+ #ifndef MICROPY_PY_BLEIO
145+ #define MICROPY_PY_BLEIO (0)
146146#endif
147147
148- #ifndef MICROPY_PY_BLE_NUS
149- #define MICROPY_PY_BLE_NUS (0)
148+ #ifndef MICROPY_PY_UBLUEPY
149+ #define MICROPY_PY_UBLUEPY (0)
150150#endif
151151
152152// type definitions for the specific machine
@@ -181,22 +181,20 @@ extern const struct _mp_obj_module_t struct_module;
181181extern const struct _mp_obj_module_t time_module ;
182182extern const struct _mp_obj_module_t supervisor_module ;
183183extern const struct _mp_obj_module_t gamepad_module ;
184+ extern const struct _mp_obj_module_t bleio_module ;
184185
185186extern const struct _mp_obj_module_t mp_module_ubluepy ;
186187
187- extern const struct _mp_obj_module_t ble_module ;
188-
189188#if MICROPY_PY_UBLUEPY
190189#define UBLUEPY_MODULE { MP_ROM_QSTR(MP_QSTR_ubluepy), MP_ROM_PTR(&mp_module_ubluepy) },
191190#else
192191#define UBLUEPY_MODULE
193192#endif
194193
195- #if MICROPY_PY_BLE
196- extern const struct _mp_obj_module_t ble_module ;
197- #define BLE_MODULE { MP_ROM_QSTR(MP_QSTR_ble), MP_ROM_PTR(&ble_module) },
194+ #if MICROPY_PY_BLEIO
195+ #define BLEIO_MODULE { MP_ROM_QSTR(MP_QSTR_bleio), MP_ROM_PTR(&bleio_module) },
198196#else
199- #define BLE_MODULE
197+ #define BLEIO_MODULE
200198#endif
201199
202200#define MICROPY_PORT_BUILTIN_MODULES \
@@ -214,7 +212,7 @@ extern const struct _mp_obj_module_t ble_module;
214212 { MP_OBJ_NEW_QSTR (MP_QSTR_supervisor ), (mp_obj_t)&supervisor_module }, \
215213 { MP_OBJ_NEW_QSTR (MP_QSTR_gamepad ), (mp_obj_t)&gamepad_module }, \
216214 { MP_OBJ_NEW_QSTR (MP_QSTR_time ), (mp_obj_t)&time_module }, \
217- BLE_MODULE \
215+ BLEIO_MODULE \
218216 UBLUEPY_MODULE \
219217
220218// extra built in names to add to the global namespace
@@ -223,10 +221,6 @@ extern const struct _mp_obj_module_t ble_module;
223221 { MP_OBJ_NEW_QSTR (MP_QSTR_input), (mp_obj_t)&mp_builtin_input_obj }, \
224222 { MP_ROM_QSTR (MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) }, \
225223
226- // extra constants
227- #define MICROPY_PORT_CONSTANTS \
228- BLE_MODULE \
229-
230224#define MP_STATE_PORT MP_STATE_VM
231225
232226#define MICROPY_PORT_ROOT_POINTERS \
0 commit comments