diff options
author | Uros Majstorovic <majstor@majstor.org> | 2018-01-16 23:43:07 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2018-01-16 23:43:07 +0100 |
commit | 01c3e3af2394f863323b846fa304ff7e0a30e9df (patch) | |
tree | 84b499e6ece88e637ed86bbdd87333613e2433c5 /code/fe310/eos/event.h | |
parent | 0d0e9facfcea3cf96da3b63285865182fdd5477e (diff) |
eos support
Diffstat (limited to 'code/fe310/eos/event.h')
-rw-r--r-- | code/fe310/eos/event.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/code/fe310/eos/event.h b/code/fe310/eos/event.h new file mode 100644 index 0000000..21079b4 --- /dev/null +++ b/code/fe310/eos/event.h @@ -0,0 +1,16 @@ +#include <stdint.h> + +#define EOS_EVT_MASK_NET 0x80 +#define EOS_EVT_TIMER 0x01 +#define EOS_EVT_UI 0x02 + +#define EOS_EVT_SIZE_Q 4 + +typedef void (*eos_evt_fptr_t) (unsigned char, unsigned char *, uint16_t); + +void eos_evtq_init(void); +int eos_evtq_push(unsigned char cmd, unsigned char *buffer, uint16_t len); +void eos_evtq_pop(unsigned char *cmd, unsigned char **buffer, uint16_t *len); +void eos_evtq_handle(unsigned char cmd, unsigned char *buffer, uint16_t len); +void eos_evtq_loop(void); +void eos_evtq_set_handler(unsigned char cmd, eos_evt_fptr_t handler);
\ No newline at end of file |