diff options
Diffstat (limited to 'cc3200/misc')
-rw-r--r-- | cc3200/misc/mperror.c | 4 | ||||
-rw-r--r-- | cc3200/misc/mpsystick.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/cc3200/misc/mperror.c b/cc3200/misc/mperror.c index 624a9d91d0..5fa8442fd5 100644 --- a/cc3200/misc/mperror.c +++ b/cc3200/misc/mperror.c @@ -151,12 +151,12 @@ void mperror_heartbeat_signal (void) { mperror_heart_beat.do_disable = false; } else if (mperror_heart_beat.enabled) { if (!mperror_heart_beat.beating) { - if ((mperror_heart_beat.on_time = HAL_GetTick()) - mperror_heart_beat.off_time > MPERROR_HEARTBEAT_OFF_MS) { + if ((mperror_heart_beat.on_time = mp_hal_ticks_ms()) - mperror_heart_beat.off_time > MPERROR_HEARTBEAT_OFF_MS) { MAP_GPIOPinWrite(MICROPY_SYS_LED_PORT, MICROPY_SYS_LED_PORT_PIN, MICROPY_SYS_LED_PORT_PIN); mperror_heart_beat.beating = true; } } else { - if ((mperror_heart_beat.off_time = HAL_GetTick()) - mperror_heart_beat.on_time > MPERROR_HEARTBEAT_ON_MS) { + if ((mperror_heart_beat.off_time = mp_hal_ticks_ms()) - mperror_heart_beat.on_time > MPERROR_HEARTBEAT_ON_MS) { MAP_GPIOPinWrite(MICROPY_SYS_LED_PORT, MICROPY_SYS_LED_PORT_PIN, 0); mperror_heart_beat.beating = false; } diff --git a/cc3200/misc/mpsystick.c b/cc3200/misc/mpsystick.c index 05fe4fca76..63b6c2d9df 100644 --- a/cc3200/misc/mpsystick.c +++ b/cc3200/misc/mpsystick.c @@ -40,12 +40,12 @@ bool sys_tick_has_passed(uint32_t start_tick, uint32_t delay_ms) { - return HAL_GetTick() - start_tick >= delay_ms; + return mp_hal_ticks_ms() - start_tick >= delay_ms; } // waits until at least delay_ms milliseconds have passed from the sampling of // startTick. Handles overflow properly. Assumes stc was taken from -// HAL_GetTick() some time before calling this function. +// mp_hal_ticks_ms() some time before calling this function. void sys_tick_wait_at_least(uint32_t start_tick, uint32_t delay_ms) { #ifdef USE_FREERTOS vTaskDelay (delay_ms / portTICK_PERIOD_MS); @@ -58,11 +58,11 @@ void sys_tick_wait_at_least(uint32_t start_tick, uint32_t delay_ms) { // The SysTick timer counts down at HAL_FCPU_HZ, so we can use that knowledge // to grab a microsecond counter. -// We assume that HAL_GetTick returns milliseconds. +// We assume that mp_hal_ticks_ms returns milliseconds. uint32_t sys_tick_get_microseconds(void) { mp_uint_t irq_state = disable_irq(); uint32_t counter = SysTickValueGet(); - uint32_t milliseconds = HAL_GetTick(); + uint32_t milliseconds = mp_hal_ticks_ms(); enable_irq(irq_state); uint32_t load = SysTickPeriodGet(); |