all: Rename MP_QSTR_umodule to MP_QSTR_module everywhere.
This renames the builtin-modules, such that help('modules') and printing
the module object will show "module" rather than "umodule".
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
@@ -12,11 +12,11 @@ should work with MicroPython (but not all were tested).
|
||||
Features supported at this time:
|
||||
|
||||
* REPL (interactive prompt) over Zephyr UART console.
|
||||
* `utime` module for time measurements and delays.
|
||||
* `time` module for time measurements and delays.
|
||||
* `machine.Pin` class for GPIO control, with IRQ support.
|
||||
* `machine.I2C` class for I2C control.
|
||||
* `machine.SPI` class for SPI control.
|
||||
* `usocket` module for networking (IPv4/IPv6).
|
||||
* `socket` module for networking (IPv4/IPv6).
|
||||
* "Frozen modules" support to allow to bundle Python modules together
|
||||
with firmware. Including complete applications, including with
|
||||
run-on-boot capability.
|
||||
|
||||
@@ -61,7 +61,7 @@ STATIC mp_obj_t machine_idle(void) {
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_idle_obj, machine_idle);
|
||||
|
||||
STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_machine) },
|
||||
#ifdef CONFIG_REBOOT
|
||||
{ MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) },
|
||||
#endif
|
||||
@@ -89,6 +89,6 @@ const mp_obj_module_t mp_module_machine = {
|
||||
.globals = (mp_obj_dict_t *)&machine_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine);
|
||||
MP_REGISTER_MODULE(MP_QSTR_machine, mp_module_machine);
|
||||
|
||||
#endif // MICROPY_PY_MACHINE
|
||||
|
||||
@@ -449,7 +449,7 @@ STATIC mp_obj_t pkt_get_info(void) {
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_0(pkt_get_info_obj, pkt_get_info);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_usocket_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_usocket) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_socket) },
|
||||
// objects
|
||||
{ MP_ROM_QSTR(MP_QSTR_socket), MP_ROM_PTR(&socket_type) },
|
||||
// class constants
|
||||
@@ -473,6 +473,6 @@ const mp_obj_module_t mp_module_usocket = {
|
||||
.globals = (mp_obj_dict_t *)&mp_module_usocket_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_usocket);
|
||||
MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_usocket);
|
||||
|
||||
#endif // MICROPY_PY_USOCKET
|
||||
|
||||
Reference in New Issue
Block a user