From acce7d8e05ac38776d6340342f6a7868df4f7f28 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sun, 28 Nov 2021 23:53:05 +0100 Subject: lcd driver added; fixed startup code; --- fw/fe310/eos/timer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fw/fe310/eos/timer.c') diff --git a/fw/fe310/eos/timer.c b/fw/fe310/eos/timer.c index dbaaf91..5ae58da 100644 --- a/fw/fe310/eos/timer.c +++ b/fw/fe310/eos/timer.c @@ -4,6 +4,7 @@ #include "encoding.h" #include "platform.h" +#include "eos.h" #include "msgq.h" #include "event.h" #include "timer.h" @@ -46,7 +47,7 @@ void _eos_timer_handle(void) { if (*mtimecmp == 0) clear_csr(mie, MIP_MTIP); } -void eos_timer_init(uint8_t wakeup_cause) { +int eos_timer_init(uint8_t wakeup_cause) { int i; uint64_t *mtimecmp = (uint64_t *) (CLINT_CTRL_ADDR + CLINT_MTIMECMP); @@ -57,6 +58,8 @@ void eos_timer_init(uint8_t wakeup_cause) { timer_handler[i] = NULL; } eos_evtq_set_handler(EOS_EVT_TIMER, timer_handle_evt); + + return EOS_OK; } void eos_timer_set_handler(unsigned char evt, eos_timer_handler_t handler) { -- cgit v1.2.3