diff options
author | Uros Majstorovic <majstor@majstor.org> | 2022-03-12 13:08:52 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2022-03-12 13:08:52 +0100 |
commit | 3436ce5d3ffbc2777e785310bac971c830cbb4ff (patch) | |
tree | c3ffb0d18bb992e8b97818e4d0b369844979012d /ecp/src/platform/fe310/time.c | |
parent | d359dd9981f4137e8873a7a571e5c54c5b2449c4 (diff) |
new rev compile OK
Diffstat (limited to 'ecp/src/platform/fe310/time.c')
-rw-r--r-- | ecp/src/platform/fe310/time.c | 10 |
1 files changed, 6 insertions, 4 deletions
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 <stdlib.h> + #include <core.h> #include <tr.h> @@ -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); } |