diff options
Diffstat (limited to 'cc3200/mods/pybrtc.c')
-rw-r--r-- | cc3200/mods/pybrtc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cc3200/mods/pybrtc.c b/cc3200/mods/pybrtc.c index 95b676d4a3..d57e11167c 100644 --- a/cc3200/mods/pybrtc.c +++ b/cc3200/mods/pybrtc.c @@ -31,7 +31,6 @@ #include MICROPY_HAL_H #include "py/obj.h" #include "py/runtime.h" -#include "modutime.h" #include "inc/hw_types.h" #include "inc/hw_ints.h" #include "inc/hw_memmap.h" @@ -40,6 +39,7 @@ #include "pybrtc.h" #include "pybsleep.h" #include "mpcallback.h" +#include "timeutils.h" /// \moduleref pyb /// \class RTC - real time clock @@ -82,7 +82,7 @@ void pybrtc_init(void) { // fresh reset; configure the RTC Calendar // set the date to 1st Jan 2015 // set the time to 00:00:00 - uint32_t seconds = mod_time_seconds_since_2000(2015, 1, 1, 0, 0, 0); + uint32_t seconds = timeutils_seconds_since_2000(2015, 1, 1, 0, 0, 0); // Mark the RTC in use first MAP_PRCMRTCInUseSet(); @@ -137,7 +137,7 @@ STATIC void pyb_rtc_callback_disable (mp_obj_t self_in) { /// `weekday` is 0-6 for Monday through Sunday. /// mp_obj_t pyb_rtc_datetime(mp_uint_t n_args, const mp_obj_t *args) { - mod_struct_time tm; + timeutils_struct_time_t tm; uint32_t seconds; uint16_t mseconds; @@ -145,7 +145,7 @@ mp_obj_t pyb_rtc_datetime(mp_uint_t n_args, const mp_obj_t *args) { // get the seconds and the milliseconds from the RTC MAP_PRCMRTCGet(&seconds, &mseconds); mseconds = RTC_CYCLES_U16MS(mseconds); - mod_time_seconds_since_2000_to_struct_time(seconds, &tm); + timeutils_seconds_since_2000_to_struct_time(seconds, &tm); mp_obj_t tuple[8] = { mp_obj_new_int(tm.tm_year), @@ -172,7 +172,7 @@ mp_obj_t pyb_rtc_datetime(mp_uint_t n_args, const mp_obj_t *args) { tm.tm_sec = mp_obj_get_int(items[6]); mseconds = mp_obj_get_int(items[7]); - seconds = mod_time_seconds_since_2000(tm.tm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); + seconds = timeutils_seconds_since_2000(tm.tm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); mseconds = RTC_U16MS_CYCLES(mseconds); MAP_PRCMRTCSet(seconds, mseconds); |