From edec491d59697a635ddce7a19a870dd3e8d2f3ed Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Tue, 15 Oct 2019 18:11:40 +0200 Subject: event handler flags per evt subtype timer has evt subtypes i2s refactor i2s has spk event i2s fixed intr handler audio buf push msgq fixed get message --- code/fe310/eos/timer.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'code/fe310/eos/timer.h') diff --git a/code/fe310/eos/timer.h b/code/fe310/eos/timer.h index 929283b..34512fa 100644 --- a/code/fe310/eos/timer.h +++ b/code/fe310/eos/timer.h @@ -1,7 +1,12 @@ #include -typedef uint32_t (*eos_timer_fptr_t) (void); +#define EOS_TIMER_ETYPE_ECP 1 +#define EOS_TIMER_ETYPE_USER 2 + +#define EOS_TIMER_MAX_ETYPE 4 + +typedef void (*eos_timer_fptr_t) (unsigned char); void eos_timer_init(void); -void eos_timer_set(uint32_t tick, unsigned char is_evt); -void eos_timer_set_handler(eos_timer_fptr_t handler); +void eos_timer_set(uint32_t tick, unsigned char evt); +void eos_timer_set_handler(unsigned char evt, eos_timer_fptr_t handler, uint8_t flags); -- cgit v1.2.3