all: Rename mp_umodule*, mp_module_umodule* to remove the "u" prefix.
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
@@ -63,7 +63,7 @@ uintptr_t mp_hal_stdio_poll(uintptr_t poll_flags) {
|
||||
ret |= MP_STREAM_POLL_RD;
|
||||
}
|
||||
if (poll_flags & MP_STREAM_POLL_WR) {
|
||||
ret |= mp_uos_dupterm_poll(poll_flags);
|
||||
ret |= mp_os_dupterm_poll(poll_flags);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -95,7 +95,7 @@ void mp_hal_debug_str(const char *str) {
|
||||
#endif
|
||||
|
||||
void mp_hal_stdout_tx_strn(const char *str, uint32_t len) {
|
||||
mp_uos_dupterm_tx_strn(str, len);
|
||||
mp_os_dupterm_tx_strn(str, len);
|
||||
}
|
||||
|
||||
void mp_hal_debug_tx_strn_cooked(void *env, const char *str, uint32_t len) {
|
||||
@@ -146,7 +146,7 @@ STATIC void dupterm_task_handler(os_event_t *evt) {
|
||||
}
|
||||
lock = 1;
|
||||
while (1) {
|
||||
int c = mp_uos_dupterm_rx_chr();
|
||||
int c = mp_os_dupterm_rx_chr();
|
||||
if (c < 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ STATIC void mp_reset(void) {
|
||||
args[1] = MP_OBJ_NEW_SMALL_INT(115200);
|
||||
args[0] = MP_OBJ_TYPE_GET_SLOT(&pyb_uart_type, make_new)(&pyb_uart_type, 2, 0, args);
|
||||
args[1] = MP_OBJ_NEW_SMALL_INT(1);
|
||||
mp_uos_dupterm_obj.fun.var(2, args);
|
||||
mp_os_dupterm_obj.fun.var(2, args);
|
||||
}
|
||||
|
||||
#if MICROPY_ESPNOW
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
#include "esp_mphal.h"
|
||||
#include "user_interface.h"
|
||||
|
||||
STATIC const char *mp_uos_uname_release(void) {
|
||||
STATIC const char *mp_os_uname_release(void) {
|
||||
return system_get_sdk_version();
|
||||
}
|
||||
|
||||
STATIC mp_obj_t mp_uos_urandom(mp_obj_t num) {
|
||||
STATIC mp_obj_t mp_os_urandom(mp_obj_t num) {
|
||||
mp_int_t n = mp_obj_get_int(num);
|
||||
vstr_t vstr;
|
||||
vstr_init_len(&vstr, n);
|
||||
@@ -50,9 +50,9 @@ STATIC mp_obj_t mp_uos_urandom(mp_obj_t num) {
|
||||
}
|
||||
return mp_obj_new_bytes_from_vstr(&vstr);
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_uos_urandom_obj, mp_uos_urandom);
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_os_urandom_obj, mp_os_urandom);
|
||||
|
||||
void mp_uos_dupterm_stream_detached_attached(mp_obj_t stream_detached, mp_obj_t stream_attached) {
|
||||
void mp_os_dupterm_stream_detached_attached(mp_obj_t stream_detached, mp_obj_t stream_attached) {
|
||||
if (mp_obj_get_type(stream_attached) == &pyb_uart_type) {
|
||||
++uart_attached_to_dupterm;
|
||||
}
|
||||
@@ -61,9 +61,9 @@ void mp_uos_dupterm_stream_detached_attached(mp_obj_t stream_detached, mp_obj_t
|
||||
}
|
||||
}
|
||||
|
||||
STATIC mp_obj_t mp_uos_dupterm_notify(mp_obj_t obj_in) {
|
||||
STATIC mp_obj_t mp_os_dupterm_notify(mp_obj_t obj_in) {
|
||||
(void)obj_in;
|
||||
mp_hal_signal_dupterm_input();
|
||||
return mp_const_none;
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_uos_dupterm_notify_obj, mp_uos_dupterm_notify);
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_os_dupterm_notify_obj, mp_os_dupterm_notify);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "modmachine.h"
|
||||
|
||||
// Return the localtime as an 8-tuple.
|
||||
STATIC mp_obj_t mp_utime_localtime_get(void) {
|
||||
STATIC mp_obj_t mp_time_localtime_get(void) {
|
||||
mp_int_t seconds = pyb_rtc_get_us_since_epoch() / 1000 / 1000;
|
||||
timeutils_struct_time_t tm;
|
||||
timeutils_seconds_since_epoch_to_struct_time(seconds, &tm);
|
||||
@@ -48,7 +48,7 @@ STATIC mp_obj_t mp_utime_localtime_get(void) {
|
||||
}
|
||||
|
||||
// Returns the number of seconds, as an integer, since the Epoch.
|
||||
STATIC mp_obj_t mp_utime_time_get(void) {
|
||||
STATIC mp_obj_t mp_time_time_get(void) {
|
||||
// get date and time
|
||||
return mp_obj_new_int(pyb_rtc_get_us_since_epoch() / 1000 / 1000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user