From 3436ce5d3ffbc2777e785310bac971c830cbb4ff Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sat, 12 Mar 2022 13:08:52 +0100 Subject: new rev compile OK --- ecp/src/platform/fe310/time.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ecp/src/platform/fe310/time.c') diff --git a/ecp/src/platform/fe310/time.c b/ecp/src/platform/fe310/time.c index 3c74933..1e5eb17 100644 --- a/ecp/src/platform/fe310/time.c +++ b/ecp/src/platform/fe310/time.c @@ -1,3 +1,5 @@ +#include + #include #include @@ -9,7 +11,7 @@ extern ECPSocket *_ecp_tr_sock; static void timer_handler(unsigned char type) { - ecp_cts_t next = ecp_timer_exe(_ecp_tr_sock); + ecp_sts_t next = ecp_timer_exe(_ecp_tr_sock); if (next) { eos_timer_set(next, EOS_TIMER_ETYPE_ECP); } @@ -21,15 +23,15 @@ int ecp_tm_init(ECPContext *ctx) { return ECP_OK; } -ecp_cts_t ecp_tm_abstime_ms(ecp_cts_t msec) { +ecp_sts_t ecp_tm_abstime_ms(ecp_sts_t msec) { return eos_time_get_tick() * 1000 / EOS_TIMER_RTC_FREQ + msec; } -void ecp_tm_sleep_ms(ecp_cts_t msec) { +void ecp_tm_sleep_ms(ecp_sts_t msec) { eos_time_sleep(msec); } -void ecp_tm_timer_set(ecp_cts_t next) { +void ecp_tm_timer_set(ecp_sts_t next) { uint32_t _next = eos_timer_get(EOS_TIMER_ETYPE_ECP); if ((_next == EOS_TIMER_NONE) || (next < _next)) eos_timer_set(next, EOS_TIMER_ETYPE_ECP); } -- cgit v1.2.3