extmod/modbluetooth: Rename module to "ubluetooth".

For consistency with "umachine". Now that weak links are enabled
by default for built-in modules, this should be a no-op, but allows
extension of the bluetooth module by user code.

Also move registration of ubluetooth to objmodule rather than
port-specific.
This commit is contained in:
Jim Mussared
2019-10-22 17:03:59 +11:00
committed by Damien George
parent 30e25174bb
commit b02d7e612d
5 changed files with 6 additions and 18 deletions

View File

@@ -645,7 +645,7 @@ STATIC const mp_obj_type_t bluetooth_ble_type = {
};
STATIC const mp_rom_map_elem_t mp_module_bluetooth_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_bluetooth) },
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ubluetooth) },
{ MP_ROM_QSTR(MP_QSTR_BLE), MP_ROM_PTR(&bluetooth_ble_type) },
{ MP_ROM_QSTR(MP_QSTR_UUID), MP_ROM_PTR(&bluetooth_uuid_type) },
{ MP_ROM_QSTR(MP_QSTR_FLAG_READ), MP_ROM_INT(MP_BLUETOOTH_CHARACTERISTIC_FLAG_READ) },
@@ -655,7 +655,7 @@ STATIC const mp_rom_map_elem_t mp_module_bluetooth_globals_table[] = {
STATIC MP_DEFINE_CONST_DICT(mp_module_bluetooth_globals, mp_module_bluetooth_globals_table);
const mp_obj_module_t mp_module_bluetooth = {
const mp_obj_module_t mp_module_ubluetooth = {
.base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_bluetooth_globals,
};