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:
parent
d080d427eb
commit
30628d1bb7
|
@ -7,7 +7,7 @@
|
|||
mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *args) {
|
||||
MP_DYNRUNTIME_INIT_ENTRY
|
||||
|
||||
mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_uheapq));
|
||||
mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_heapq));
|
||||
mp_store_global(MP_QSTR_heappush, MP_OBJ_FROM_PTR(&mod_uheapq_heappush_obj));
|
||||
mp_store_global(MP_QSTR_heappop, MP_OBJ_FROM_PTR(&mod_uheapq_heappop_obj));
|
||||
mp_store_global(MP_QSTR_heapify, MP_OBJ_FROM_PTR(&mod_uheapq_heapify_obj));
|
||||
|
|
|
@ -16,7 +16,7 @@ mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *a
|
|||
yasmarang_n = 69;
|
||||
yasmarang_d = 233;
|
||||
|
||||
mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_urandom));
|
||||
mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_random));
|
||||
mp_store_global(MP_QSTR_getrandbits, MP_OBJ_FROM_PTR(&mod_urandom_getrandbits_obj));
|
||||
mp_store_global(MP_QSTR_seed, MP_OBJ_FROM_PTR(&mod_urandom_seed_obj));
|
||||
#if MICROPY_PY_URANDOM_EXTRA_FUNCS
|
||||
|
|
|
@ -63,7 +63,7 @@ mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *a
|
|||
MP_OBJ_TYPE_SET_SLOT(&match_type, locals_dict, (void*)&match_locals_dict, 1);
|
||||
|
||||
re_type.base.type = (void*)&mp_fun_table.type_type;
|
||||
re_type.name = MP_QSTR_ure;
|
||||
re_type.name = MP_QSTR_re;
|
||||
MP_OBJ_TYPE_SET_SLOT(&re_type, print, re_print, 0);
|
||||
re_locals_dict_table[0] = (mp_map_elem_t){ MP_OBJ_NEW_QSTR(MP_QSTR_match), MP_OBJ_FROM_PTR(&re_match_obj) };
|
||||
re_locals_dict_table[1] = (mp_map_elem_t){ MP_OBJ_NEW_QSTR(MP_QSTR_search), MP_OBJ_FROM_PTR(&re_search_obj) };
|
||||
|
|
|
@ -27,7 +27,7 @@ mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *a
|
|||
decompio_locals_dict_table[2] = (mp_map_elem_t){ MP_OBJ_NEW_QSTR(MP_QSTR_readline), MP_OBJ_FROM_PTR(&mp_stream_unbuffered_readline_obj) };
|
||||
MP_OBJ_TYPE_SET_SLOT(&decompio_type, locals_dict, (void*)&decompio_locals_dict, 2);
|
||||
|
||||
mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_uzlib));
|
||||
mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_zlib));
|
||||
mp_store_global(MP_QSTR_decompress, MP_OBJ_FROM_PTR(&mod_uzlib_decompress_obj));
|
||||
mp_store_global(MP_QSTR_DecompIO, MP_OBJ_FROM_PTR(&decompio_type));
|
||||
|
||||
|
|
|
@ -985,7 +985,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
|||
);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_bluetooth_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ubluetooth) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_bluetooth) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_BLE), MP_ROM_PTR(&mp_type_bluetooth_ble) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_UUID), MP_ROM_PTR(&mp_type_bluetooth_uuid) },
|
||||
|
||||
|
@ -1004,7 +1004,7 @@ const mp_obj_module_t mp_module_ubluetooth = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_bluetooth_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_ubluetooth, mp_module_ubluetooth);
|
||||
MP_REGISTER_MODULE(MP_QSTR_bluetooth, mp_module_ubluetooth);
|
||||
|
||||
// Helpers
|
||||
|
||||
|
|
|
@ -1802,7 +1802,7 @@ const mp_obj_module_t mp_module_lwip = {
|
|||
MP_REGISTER_MODULE(MP_QSTR_lwip, mp_module_lwip);
|
||||
|
||||
// On LWIP-ports, this is the usocket module (replaces extmod/modusocket.c).
|
||||
MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_lwip);
|
||||
MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_lwip);
|
||||
|
||||
MP_REGISTER_ROOT_POINTER(mp_obj_t lwip_slip_stream);
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_binascii_crc32_obj, 1, 2, mod_bin
|
|||
#endif
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_binascii_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ubinascii) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_binascii) },
|
||||
#if MICROPY_PY_BUILTINS_BYTES_HEX
|
||||
{ MP_ROM_QSTR(MP_QSTR_hexlify), MP_ROM_PTR(&bytes_hex_as_bytes_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_unhexlify), MP_ROM_PTR(&bytes_fromhex_obj) },
|
||||
|
@ -203,6 +203,6 @@ const mp_obj_module_t mp_module_ubinascii = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_binascii_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_ubinascii, mp_module_ubinascii);
|
||||
MP_REGISTER_MODULE(MP_QSTR_binascii, mp_module_ubinascii);
|
||||
|
||||
#endif // MICROPY_PY_UBINASCII
|
||||
|
|
|
@ -357,7 +357,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
|||
);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_ucryptolib_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ucryptolib) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_cryptolib) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_aes), MP_ROM_PTR(&ucryptolib_aes_type) },
|
||||
#if MICROPY_PY_UCRYPTOLIB_CONSTS
|
||||
{ MP_ROM_QSTR(MP_QSTR_MODE_ECB), MP_ROM_INT(UCRYPTOLIB_MODE_ECB) },
|
||||
|
@ -375,6 +375,6 @@ const mp_obj_module_t mp_module_ucryptolib = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_ucryptolib_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_ucryptolib, mp_module_ucryptolib);
|
||||
MP_REGISTER_MODULE(MP_QSTR_cryptolib, mp_module_ucryptolib);
|
||||
|
||||
#endif // MICROPY_PY_UCRYPTOLIB
|
||||
|
|
|
@ -355,7 +355,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
|||
#endif // MICROPY_PY_UHASHLIB_MD5
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_uhashlib_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uhashlib) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_hashlib) },
|
||||
#if MICROPY_PY_UHASHLIB_SHA256
|
||||
{ MP_ROM_QSTR(MP_QSTR_sha256), MP_ROM_PTR(&uhashlib_sha256_type) },
|
||||
#endif
|
||||
|
@ -374,6 +374,6 @@ const mp_obj_module_t mp_module_uhashlib = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_uhashlib_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uhashlib, mp_module_uhashlib);
|
||||
MP_REGISTER_MODULE(MP_QSTR_hashlib, mp_module_uhashlib);
|
||||
|
||||
#endif // MICROPY_PY_UHASHLIB
|
||||
|
|
|
@ -105,7 +105,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_uheapq_heapify_obj, mod_uheapq_heapify);
|
|||
|
||||
#if !MICROPY_ENABLE_DYNRUNTIME
|
||||
STATIC const mp_rom_map_elem_t mp_module_uheapq_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uheapq) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_heapq) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_heappush), MP_ROM_PTR(&mod_uheapq_heappush_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_heappop), MP_ROM_PTR(&mod_uheapq_heappop_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_heapify), MP_ROM_PTR(&mod_uheapq_heapify_obj) },
|
||||
|
@ -118,7 +118,7 @@ const mp_obj_module_t mp_module_uheapq = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_uheapq_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uheapq, mp_module_uheapq);
|
||||
MP_REGISTER_MODULE(MP_QSTR_heapq, mp_module_uheapq);
|
||||
#endif
|
||||
|
||||
#endif // MICROPY_PY_UHEAPQ
|
||||
|
|
|
@ -367,7 +367,7 @@ STATIC mp_obj_t mod_ujson_loads(mp_obj_t obj) {
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_ujson_loads_obj, mod_ujson_loads);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_ujson_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ujson) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_json) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_dump), MP_ROM_PTR(&mod_ujson_dump_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_dumps), MP_ROM_PTR(&mod_ujson_dumps_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_load), MP_ROM_PTR(&mod_ujson_load_obj) },
|
||||
|
@ -381,6 +381,6 @@ const mp_obj_module_t mp_module_ujson = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_ujson_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_ujson, mp_module_ujson);
|
||||
MP_REGISTER_MODULE(MP_QSTR_json, mp_module_ujson);
|
||||
|
||||
#endif // MICROPY_PY_UJSON
|
||||
|
|
|
@ -122,7 +122,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(mp_uos_uname_obj, mp_uos_uname);
|
|||
#endif
|
||||
|
||||
STATIC const mp_rom_map_elem_t os_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uos) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_os) },
|
||||
|
||||
#if MICROPY_PY_UOS_GETENV_PUTENV_UNSETENV
|
||||
{ MP_ROM_QSTR(MP_QSTR_getenv), MP_ROM_PTR(&mp_uos_getenv_obj) },
|
||||
|
@ -141,7 +141,7 @@ STATIC const mp_rom_map_elem_t os_module_globals_table[] = {
|
|||
#if MICROPY_PY_UOS_UNAME
|
||||
{ MP_ROM_QSTR(MP_QSTR_uname), MP_ROM_PTR(&mp_uos_uname_obj) },
|
||||
#endif
|
||||
#if MICROPY_PY_UOS_URANDOM
|
||||
#if MICROPY_PY_OS_URANDOM
|
||||
{ MP_ROM_QSTR(MP_QSTR_urandom), MP_ROM_PTR(&mp_uos_urandom_obj) },
|
||||
#endif
|
||||
|
||||
|
@ -195,6 +195,6 @@ const mp_obj_module_t mp_module_uos = {
|
|||
.globals = (mp_obj_dict_t *)&os_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos);
|
||||
MP_REGISTER_MODULE(MP_QSTR_os, mp_module_uos);
|
||||
|
||||
#endif // MICROPY_PY_UOS
|
||||
|
|
|
@ -62,7 +62,7 @@ STATIC mp_obj_t platform_libc_ver(size_t n_args, const mp_obj_t *pos_args, mp_ma
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(platform_libc_ver_obj, 0, platform_libc_ver);
|
||||
|
||||
STATIC const mp_rom_map_elem_t modplatform_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uplatform) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_platform) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_platform), MP_ROM_PTR(&platform_platform_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_python_compiler), MP_ROM_PTR(&platform_python_compiler_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_libc_ver), MP_ROM_PTR(&platform_libc_ver_obj) },
|
||||
|
@ -75,6 +75,6 @@ const mp_obj_module_t mp_module_uplatform = {
|
|||
.globals = (mp_obj_dict_t *)&modplatform_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uplatform, mp_module_uplatform);
|
||||
MP_REGISTER_MODULE(MP_QSTR_platform, mp_module_uplatform);
|
||||
|
||||
#endif // MICROPY_PY_UPLATFORM
|
||||
|
|
|
@ -231,7 +231,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(mod_urandom___init___obj, mod_urandom___init__)
|
|||
|
||||
#if !MICROPY_ENABLE_DYNRUNTIME
|
||||
STATIC const mp_rom_map_elem_t mp_module_urandom_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_urandom) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_random) },
|
||||
#if SEED_ON_IMPORT
|
||||
{ MP_ROM_QSTR(MP_QSTR___init__), MP_ROM_PTR(&mod_urandom___init___obj) },
|
||||
#endif
|
||||
|
@ -255,7 +255,7 @@ const mp_obj_module_t mp_module_urandom = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_urandom_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_urandom, mp_module_urandom);
|
||||
MP_REGISTER_MODULE(MP_QSTR_random, mp_module_urandom);
|
||||
#endif
|
||||
|
||||
#endif // MICROPY_PY_URANDOM
|
||||
|
|
|
@ -414,7 +414,7 @@ STATIC MP_DEFINE_CONST_DICT(re_locals_dict, re_locals_dict_table);
|
|||
|
||||
STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
||||
re_type,
|
||||
MP_QSTR_ure,
|
||||
MP_QSTR_re,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
print, re_print,
|
||||
locals_dict, &re_locals_dict
|
||||
|
@ -451,7 +451,7 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_re_compile_obj, 1, 2, mod_re_compile);
|
|||
|
||||
#if !MICROPY_ENABLE_DYNRUNTIME
|
||||
STATIC const mp_rom_map_elem_t mp_module_re_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ure) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_re) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_compile), MP_ROM_PTR(&mod_re_compile_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_match), MP_ROM_PTR(&re_match_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_search), MP_ROM_PTR(&re_search_obj) },
|
||||
|
@ -470,7 +470,7 @@ const mp_obj_module_t mp_module_ure = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_re_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_ure, mp_module_ure);
|
||||
MP_REGISTER_MODULE(MP_QSTR_re, mp_module_ure);
|
||||
#endif
|
||||
|
||||
// Source files #include'd here to make sure they're compiled in
|
||||
|
|
|
@ -355,7 +355,7 @@ STATIC mp_obj_t select_poll(void) {
|
|||
MP_DEFINE_CONST_FUN_OBJ_0(mp_select_poll_obj, select_poll);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_select_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uselect) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_select) },
|
||||
#if MICROPY_PY_USELECT_SELECT
|
||||
{ MP_ROM_QSTR(MP_QSTR_select), MP_ROM_PTR(&mp_select_select_obj) },
|
||||
#endif
|
||||
|
@ -373,6 +373,6 @@ const mp_obj_module_t mp_module_uselect = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_select_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uselect, mp_module_uselect);
|
||||
MP_REGISTER_MODULE(MP_QSTR_select, mp_module_uselect);
|
||||
|
||||
#endif // MICROPY_PY_USELECT
|
||||
|
|
|
@ -616,7 +616,7 @@ STATIC mp_obj_t mod_usocket_getaddrinfo(size_t n_args, const mp_obj_t *args) {
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_usocket_getaddrinfo_obj, 2, 6, mod_usocket_getaddrinfo);
|
||||
|
||||
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) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_socket), MP_ROM_PTR(&socket_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_getaddrinfo), MP_ROM_PTR(&mod_usocket_getaddrinfo_obj) },
|
||||
|
@ -653,6 +653,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_NETWORK && MICROPY_PY_USOCKET && !MICROPY_PY_LWIP
|
||||
|
|
|
@ -316,9 +316,9 @@ STATIC const mp_stream_p_t ussl_socket_stream_p = {
|
|||
|
||||
STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
||||
ussl_socket_type,
|
||||
MP_QSTR_ussl,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
// Save on qstr's, reuse same as for module
|
||||
MP_QSTR_ssl,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
print, ussl_socket_print,
|
||||
protocol, &ussl_socket_stream_p,
|
||||
locals_dict, &ussl_socket_locals_dict
|
||||
|
@ -346,7 +346,7 @@ STATIC mp_obj_t mod_ssl_wrap_socket(size_t n_args, const mp_obj_t *pos_args, mp_
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mod_ssl_wrap_socket_obj, 1, mod_ssl_wrap_socket);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_ssl_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ussl) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ssl) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_wrap_socket), MP_ROM_PTR(&mod_ssl_wrap_socket_obj) },
|
||||
};
|
||||
|
||||
|
@ -357,6 +357,6 @@ const mp_obj_module_t mp_module_ussl = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_ssl_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_ussl, mp_module_ussl);
|
||||
MP_REGISTER_MODULE(MP_QSTR_ssl, mp_module_ussl);
|
||||
|
||||
#endif // MICROPY_PY_USSL && MICROPY_SSL_AXTLS
|
||||
|
|
|
@ -461,9 +461,9 @@ STATIC const mp_stream_p_t ussl_socket_stream_p = {
|
|||
|
||||
STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
||||
ussl_socket_type,
|
||||
MP_QSTR_ussl,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
// Save on qstr's, reuse same as for module
|
||||
MP_QSTR_ssl,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
print, socket_print,
|
||||
protocol, &ussl_socket_stream_p,
|
||||
locals_dict, &ussl_socket_locals_dict
|
||||
|
@ -493,7 +493,7 @@ STATIC mp_obj_t mod_ssl_wrap_socket(size_t n_args, const mp_obj_t *pos_args, mp_
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mod_ssl_wrap_socket_obj, 1, mod_ssl_wrap_socket);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_ssl_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ussl) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ssl) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_wrap_socket), MP_ROM_PTR(&mod_ssl_wrap_socket_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_CERT_NONE), MP_ROM_INT(MBEDTLS_SSL_VERIFY_NONE) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_CERT_OPTIONAL), MP_ROM_INT(MBEDTLS_SSL_VERIFY_OPTIONAL) },
|
||||
|
@ -507,6 +507,6 @@ const mp_obj_module_t mp_module_ussl = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_ssl_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_ussl, mp_module_ussl);
|
||||
MP_REGISTER_MODULE(MP_QSTR_ssl, mp_module_ussl);
|
||||
|
||||
#endif // MICROPY_PY_USSL && MICROPY_SSL_MBEDTLS
|
||||
|
|
|
@ -197,7 +197,7 @@ STATIC mp_obj_t time_ticks_add(mp_obj_t ticks_in, mp_obj_t delta_in) {
|
|||
MP_DEFINE_CONST_FUN_OBJ_2(mp_utime_ticks_add_obj, time_ticks_add);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_time_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_utime) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_time) },
|
||||
|
||||
#if MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME
|
||||
{ MP_ROM_QSTR(MP_QSTR_gmtime), MP_ROM_PTR(&mp_utime_localtime_obj) },
|
||||
|
@ -231,6 +231,6 @@ const mp_obj_module_t mp_module_utime = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_time_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime);
|
||||
MP_REGISTER_MODULE(MP_QSTR_time, mp_module_utime);
|
||||
|
||||
#endif // MICROPY_PY_UTIME
|
||||
|
|
|
@ -211,7 +211,7 @@ STATIC MP_DEFINE_CONST_DICT(utimeq_locals_dict, utimeq_locals_dict_table);
|
|||
|
||||
STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
||||
utimeq_type,
|
||||
MP_QSTR_utimeq,
|
||||
MP_QSTR_timeq,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
make_new, utimeq_make_new,
|
||||
unary_op, utimeq_unary_op,
|
||||
|
@ -219,8 +219,8 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
|||
);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_utimeq_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_utimeq) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_utimeq), MP_ROM_PTR(&utimeq_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_timeq) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_timeq), MP_ROM_PTR(&utimeq_type) },
|
||||
};
|
||||
|
||||
STATIC MP_DEFINE_CONST_DICT(mp_module_utimeq_globals, mp_module_utimeq_globals_table);
|
||||
|
@ -230,6 +230,6 @@ const mp_obj_module_t mp_module_utimeq = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_utimeq_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_utimeq, mp_module_utimeq);
|
||||
MP_REGISTER_MODULE(MP_QSTR_timeq, mp_module_utimeq);
|
||||
|
||||
#endif // MICROPY_PY_UTIMEQ
|
||||
|
|
|
@ -300,7 +300,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
|||
);
|
||||
|
||||
STATIC const mp_rom_map_elem_t uwebsocket_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uwebsocket) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_websocket) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_websocket), MP_ROM_PTR(&websocket_type) },
|
||||
};
|
||||
|
||||
|
@ -311,6 +311,6 @@ const mp_obj_module_t mp_module_uwebsocket = {
|
|||
.globals = (mp_obj_dict_t *)&uwebsocket_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uwebsocket, mp_module_uwebsocket);
|
||||
MP_REGISTER_MODULE(MP_QSTR_websocket, mp_module_uwebsocket);
|
||||
|
||||
#endif // MICROPY_PY_UWEBSOCKET
|
||||
|
|
|
@ -211,7 +211,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_uzlib_decompress_obj, 1, 3, mod_u
|
|||
|
||||
#if !MICROPY_ENABLE_DYNRUNTIME
|
||||
STATIC const mp_rom_map_elem_t mp_module_uzlib_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uzlib) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_zlib) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_decompress), MP_ROM_PTR(&mod_uzlib_decompress_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_DecompIO), MP_ROM_PTR(&decompio_type) },
|
||||
};
|
||||
|
@ -224,7 +224,7 @@ const mp_obj_module_t mp_module_uzlib = {
|
|||
};
|
||||
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uzlib, mp_module_uzlib);
|
||||
MP_REGISTER_MODULE(MP_QSTR_zlib, mp_module_uzlib);
|
||||
#endif
|
||||
|
||||
// Source files #include'd here to make sure they're compiled in
|
||||
|
|
|
@ -162,7 +162,7 @@ STATIC mp_obj_t machine_wake_reason (void) {
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_wake_reason_obj, machine_wake_reason);
|
||||
|
||||
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) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) },
|
||||
#ifdef DEBUG
|
||||
|
@ -214,5 +214,5 @@ 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);
|
||||
MP_REGISTER_ROOT_POINTER(mp_obj_t machine_config_main);
|
||||
|
|
|
@ -194,7 +194,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
|||
);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_hashlib_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uhashlib) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_hashlib) },
|
||||
//{ MP_ROM_QSTR(MP_QSTR_md5), MP_ROM_PTR(&md5_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_sha1), MP_ROM_PTR(&sha1_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_sha256), MP_ROM_PTR(&sha256_type) },
|
||||
|
|
|
@ -146,7 +146,7 @@ STATIC mp_obj_t os_dupterm(uint n_args, const mp_obj_t *args) {
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(os_dupterm_obj, 0, 1, os_dupterm);
|
||||
|
||||
STATIC const mp_rom_map_elem_t os_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uos) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_os) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_uname), MP_ROM_PTR(&os_uname_obj) },
|
||||
|
||||
|
@ -180,4 +180,4 @@ const mp_obj_module_t mp_module_uos = {
|
|||
.globals = (mp_obj_dict_t*)&os_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos);
|
||||
MP_REGISTER_MODULE(MP_QSTR_os, mp_module_uos);
|
||||
|
|
|
@ -795,7 +795,7 @@ STATIC mp_obj_t mod_usocket_getaddrinfo(mp_obj_t host_in, mp_obj_t port_in) {
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_usocket_getaddrinfo_obj, mod_usocket_getaddrinfo);
|
||||
|
||||
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) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_socket), MP_ROM_PTR(&socket_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_getaddrinfo), MP_ROM_PTR(&mod_usocket_getaddrinfo_obj) },
|
||||
|
@ -818,4 +818,4 @@ 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);
|
||||
|
|
|
@ -62,7 +62,7 @@ STATIC const mp_obj_type_t ssl_socket_type;
|
|||
// locals and stream methods
|
||||
STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
||||
ssl_socket_type,
|
||||
MP_QSTR_ussl,
|
||||
MP_QSTR_ssl,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
protocol, &socket_stream_p,
|
||||
locals_dict, &socket_locals_dict
|
||||
|
@ -136,7 +136,7 @@ arg_error:
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mod_ssl_wrap_socket_obj, 0, mod_ssl_wrap_socket);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_ussl_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ussl) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ssl) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_wrap_socket), MP_ROM_PTR(&mod_ssl_wrap_socket_obj) },
|
||||
|
||||
// class exceptions
|
||||
|
@ -160,4 +160,4 @@ const mp_obj_module_t mp_module_ussl = {
|
|||
.globals = (mp_obj_dict_t*)&mp_module_ussl_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_ussl, mp_module_ussl);
|
||||
MP_REGISTER_MODULE(MP_QSTR_ssl, mp_module_ussl);
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
|
||||
// extra constants
|
||||
#define MICROPY_PORT_CONSTANTS \
|
||||
{ MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&mp_module_machine) }, \
|
||||
{ MP_ROM_QSTR(MP_QSTR_machine), MP_ROM_PTR(&mp_module_machine) }, \
|
||||
|
||||
#define MP_STATE_PORT MP_STATE_VM
|
||||
|
||||
|
|
|
@ -272,7 +272,7 @@ STATIC mp_obj_t machine_enable_irq(mp_obj_t state_in) {
|
|||
MP_DEFINE_CONST_FUN_OBJ_1(machine_enable_irq_obj, machine_enable_irq);
|
||||
|
||||
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) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_mem8), MP_ROM_PTR(&machine_mem8_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_mem16), MP_ROM_PTR(&machine_mem16_obj) },
|
||||
|
@ -353,6 +353,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
|
||||
|
|
|
@ -844,7 +844,7 @@ STATIC mp_obj_t esp_socket_initialize() {
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_0(esp_socket_initialize_obj, esp_socket_initialize);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_socket_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) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___init__), MP_ROM_PTR(&esp_socket_initialize_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_socket), MP_ROM_PTR(&socket_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_getaddrinfo), MP_ROM_PTR(&esp_socket_getaddrinfo_obj) },
|
||||
|
@ -872,4 +872,4 @@ const mp_obj_module_t mp_module_usocket = {
|
|||
// Note: This port doesn't define MICROPY_PY_USOCKET or MICROPY_PY_LWIP so
|
||||
// this will not conflict with the common implementation provided by
|
||||
// extmod/mod{lwip,usocket}.c.
|
||||
MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_usocket);
|
||||
MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_usocket);
|
||||
|
|
|
@ -396,7 +396,7 @@ mp_uint_t machine_time_pulse_us(mp_hal_pin_obj_t pin, int pulse_level, mp_uint_t
|
|||
}
|
||||
|
||||
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) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_mem8), MP_ROM_PTR(&machine_mem8_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_mem16), MP_ROM_PTR(&machine_mem16_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_mem32), MP_ROM_PTR(&machine_mem32_obj) },
|
||||
|
@ -456,6 +456,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
|
||||
|
|
|
@ -130,7 +130,7 @@ NORETURN mp_obj_t machine_bootloader(size_t n_args, const mp_obj_t *args) {
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_bootloader_obj, 0, 1, machine_bootloader);
|
||||
|
||||
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) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_unique_id), MP_ROM_PTR(&machine_unique_id_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_soft_reset), MP_ROM_PTR(&machine_soft_reset_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) },
|
||||
|
@ -185,6 +185,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
|
||||
|
|
|
@ -205,7 +205,7 @@ STATIC mp_obj_t machine_disable_irq(void) {
|
|||
MP_DEFINE_CONST_FUN_OBJ_0(machine_disable_irq_obj, machine_disable_irq);
|
||||
|
||||
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) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_info), MP_ROM_PTR(&machine_info_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_soft_reset), MP_ROM_PTR(&machine_soft_reset_obj) },
|
||||
|
@ -266,6 +266,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
|
||||
|
|
|
@ -138,7 +138,7 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_os_dupterm_obj, 0, 1, os_dupterm);
|
|||
#endif // MICROPY_PY_MACHINE_UART
|
||||
|
||||
STATIC const mp_rom_map_elem_t os_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uos) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_os) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_uname), MP_ROM_PTR(&os_uname_obj) },
|
||||
|
||||
|
@ -197,4 +197,4 @@ const mp_obj_module_t mp_module_uos = {
|
|||
.globals = (mp_obj_dict_t*)&os_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos);
|
||||
MP_REGISTER_MODULE(MP_QSTR_os, mp_module_uos);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#if MICROPY_PY_MACHINE
|
||||
|
||||
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) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_mem8), MP_ROM_PTR(&machine_mem8_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_mem16), MP_ROM_PTR(&machine_mem16_obj) },
|
||||
|
@ -48,6 +48,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
|
||||
|
|
|
@ -4,8 +4,8 @@ This is a port of MicroPython to the Renesas RA family of microcontrollers.
|
|||
Currently supported features are:
|
||||
|
||||
- Filesystem on the internal flash using FatFs.
|
||||
- `utime` module with sleep, time, and ticks functions.
|
||||
- `uos` module with VFS support.
|
||||
- `time` module with sleep, time, and ticks functions.
|
||||
- `os` module with VFS support.
|
||||
- `machine` module with the following classes: `Pin`, `ADC`, `I2C`, `SPI`,
|
||||
`SoftI2C`, `SoftSPI`, `UART`, `RTC`
|
||||
- sdcard driver if frozen driver is installed.
|
||||
|
|
|
@ -251,7 +251,7 @@ STATIC mp_obj_t machine_reset_cause(void) {
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_reset_cause_obj, machine_reset_cause);
|
||||
|
||||
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) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_info), MP_ROM_PTR(&machine_info_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_unique_id), MP_ROM_PTR(&machine_unique_id_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) },
|
||||
|
@ -307,6 +307,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
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
|
||||
#if MICROPY_PY_MACHINE
|
||||
#define MACHINE_BUILTIN_MODULE_CONSTANTS \
|
||||
{ MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&mp_module_machine) }, \
|
||||
{ MP_ROM_QSTR(MP_QSTR_machine), MP_ROM_PTR(&mp_module_machine) }, \
|
||||
{ MP_ROM_QSTR(MP_QSTR_machine), MP_ROM_PTR(&mp_module_machine) },
|
||||
#else
|
||||
#define MACHINE_BUILTIN_MODULE_CONSTANTS
|
||||
|
|
|
@ -6,8 +6,8 @@ Currently supported features are:
|
|||
- REPL over USB VCP, and optionally over UART (on GP0/GP1).
|
||||
- Filesystem on the internal flash, using littlefs2.
|
||||
- Support for native code generation and inline assembler.
|
||||
- `utime` module with sleep, time and ticks functions.
|
||||
- `uos` module with VFS support.
|
||||
- `time` module with sleep, time and ticks functions.
|
||||
- `os` module with VFS support.
|
||||
- `machine` module with the following classes: `Pin`, `ADC`, `PWM`, `I2C`, `SPI`,
|
||||
`SoftI2C`, `SoftSPI`, `Timer`, `UART`, `WDT`.
|
||||
- `rp2` module with programmable IO (PIO) support.
|
||||
|
|
|
@ -229,7 +229,7 @@ STATIC mp_obj_t machine_enable_irq(mp_obj_t state_in) {
|
|||
MP_DEFINE_CONST_FUN_OBJ_1(machine_enable_irq_obj, machine_enable_irq);
|
||||
|
||||
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) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_unique_id), MP_ROM_PTR(&machine_unique_id_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_soft_reset), MP_ROM_PTR(&machine_soft_reset_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) },
|
||||
|
@ -278,6 +278,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
|
||||
|
|
|
@ -224,7 +224,7 @@ STATIC mp_obj_t machine_lightsleep(size_t n_args, const mp_obj_t *args) {
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_lightsleep_obj, 0, 1, machine_lightsleep);
|
||||
|
||||
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) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_soft_reset), MP_ROM_PTR(&machine_soft_reset_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_bootloader), MP_ROM_PTR(&machine_bootloader_obj) },
|
||||
|
@ -297,6 +297,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
|
||||
|
|
|
@ -386,7 +386,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_reset_cause_obj, machine_reset_cause);
|
|||
#if MICROPY_PY_MACHINE
|
||||
|
||||
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) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_info), MP_ROM_PTR(&machine_info_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_unique_id), MP_ROM_PTR(&machine_unique_id_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) },
|
||||
|
@ -471,6 +471,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
|
||||
|
|
|
@ -170,7 +170,7 @@ extern const struct _mp_obj_module_t stm_module;
|
|||
|
||||
#if MICROPY_PY_MACHINE
|
||||
#define MACHINE_BUILTIN_MODULE_CONSTANTS \
|
||||
{ MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&mp_module_machine) }, \
|
||||
{ MP_ROM_QSTR(MP_QSTR_machine), MP_ROM_PTR(&mp_module_machine) }, \
|
||||
{ MP_ROM_QSTR(MP_QSTR_machine), MP_ROM_PTR(&mp_module_machine) },
|
||||
#else
|
||||
#define MACHINE_BUILTIN_MODULE_CONSTANTS
|
||||
|
|
|
@ -86,7 +86,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(machine_idle_obj, machine_idle);
|
|||
#endif
|
||||
|
||||
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) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_mem8), MP_ROM_PTR(&machine_mem8_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_mem16), MP_ROM_PTR(&machine_mem16_obj) },
|
||||
|
@ -110,6 +110,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
|
||||
|
|
|
@ -336,7 +336,7 @@ STATIC mp_obj_t select_poll(size_t n_args, const mp_obj_t *args) {
|
|||
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_select_poll_obj, 0, 1, select_poll);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_select_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uselect) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_select) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_poll), MP_ROM_PTR(&mp_select_poll_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_POLLIN), MP_ROM_INT(POLLIN) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_POLLOUT), MP_ROM_INT(POLLOUT) },
|
||||
|
@ -351,6 +351,6 @@ const mp_obj_module_t mp_module_uselect = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_select_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uselect, mp_module_uselect);
|
||||
MP_REGISTER_MODULE(MP_QSTR_select, mp_module_uselect);
|
||||
|
||||
#endif // MICROPY_PY_USELECT_POSIX
|
||||
|
|
|
@ -674,7 +674,7 @@ STATIC mp_obj_t mod_socket_sockaddr(mp_obj_t sockaddr_in) {
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_socket_sockaddr_obj, mod_socket_sockaddr);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_socket_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) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_socket), MP_ROM_PTR(&mp_type_socket) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_getaddrinfo), MP_ROM_PTR(&mod_socket_getaddrinfo_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_inet_pton), MP_ROM_PTR(&mod_socket_inet_pton_obj) },
|
||||
|
@ -708,6 +708,6 @@ const mp_obj_module_t mp_module_socket = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_socket_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_socket);
|
||||
MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_socket);
|
||||
|
||||
#endif // MICROPY_PY_SOCKET
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#if MICROPY_PY_ARRAY
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_array_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uarray) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_array) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_array), MP_ROM_PTR(&mp_type_array) },
|
||||
};
|
||||
|
||||
|
@ -40,6 +40,6 @@ const mp_obj_module_t mp_module_uarray = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_array_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uarray, mp_module_uarray);
|
||||
MP_REGISTER_MODULE(MP_QSTR_array, mp_module_uarray);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#if MICROPY_PY_COLLECTIONS
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_collections_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ucollections) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_collections) },
|
||||
#if MICROPY_PY_COLLECTIONS_DEQUE
|
||||
{ MP_ROM_QSTR(MP_QSTR_deque), MP_ROM_PTR(&mp_type_deque) },
|
||||
#endif
|
||||
|
@ -46,6 +46,6 @@ const mp_obj_module_t mp_module_collections = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_collections_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_ucollections, mp_module_collections);
|
||||
MP_REGISTER_MODULE(MP_QSTR_collections, mp_module_collections);
|
||||
|
||||
#endif // MICROPY_PY_COLLECTIONS
|
||||
|
|
|
@ -203,7 +203,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
|||
#endif // MICROPY_PY_IO_BUFFEREDWRITER
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_io_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uio) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_io) },
|
||||
// Note: mp_builtin_open_obj should be defined by port, it's not
|
||||
// part of the core.
|
||||
{ MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) },
|
||||
|
@ -226,6 +226,6 @@ const mp_obj_module_t mp_module_io = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_io_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uio, mp_module_io);
|
||||
MP_REGISTER_MODULE(MP_QSTR_io, mp_module_io);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -251,7 +251,7 @@ STATIC mp_obj_t struct_pack_into(size_t n_args, const mp_obj_t *args) {
|
|||
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_pack_into_obj, 3, MP_OBJ_FUN_ARGS_MAX, struct_pack_into);
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_struct_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ustruct) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_struct) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_calcsize), MP_ROM_PTR(&struct_calcsize_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_pack), MP_ROM_PTR(&struct_pack_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_pack_into), MP_ROM_PTR(&struct_pack_into_obj) },
|
||||
|
@ -266,6 +266,6 @@ const mp_obj_module_t mp_module_ustruct = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_struct_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_ustruct, mp_module_ustruct);
|
||||
MP_REGISTER_MODULE(MP_QSTR_struct, mp_module_ustruct);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -294,7 +294,7 @@ const mp_obj_module_t mp_module_sys = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_sys_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_usys, mp_module_sys);
|
||||
MP_REGISTER_MODULE(MP_QSTR_sys, mp_module_sys);
|
||||
|
||||
// If MICROPY_PY_SYS_PATH_ARGV_DEFAULTS is not enabled then these two lists
|
||||
// must be initialised after the call to mp_init.
|
||||
|
|
|
@ -82,7 +82,7 @@ STATIC const mp_obj_dict_t errorcode_dict = {
|
|||
#endif
|
||||
|
||||
STATIC const mp_rom_map_elem_t mp_module_uerrno_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uerrno) },
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_errno) },
|
||||
#if MICROPY_PY_UERRNO_ERRORCODE
|
||||
{ MP_ROM_QSTR(MP_QSTR_errorcode), MP_ROM_PTR(&errorcode_dict) },
|
||||
#endif
|
||||
|
@ -99,7 +99,7 @@ const mp_obj_module_t mp_module_uerrno = {
|
|||
.globals = (mp_obj_dict_t *)&mp_module_uerrno_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uerrno, mp_module_uerrno);
|
||||
MP_REGISTER_MODULE(MP_QSTR_errno, mp_module_uerrno);
|
||||
|
||||
qstr mp_errno_to_str(mp_obj_t errno_val) {
|
||||
#if MICROPY_PY_UERRNO_ERRORCODE
|
||||
|
|
Loading…
Reference in New Issue