summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/dev/egpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/dev/egpio.c')
-rw-r--r--fw/fe310/eos/dev/egpio.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fw/fe310/eos/dev/egpio.c b/fw/fe310/eos/dev/egpio.c
index cfcd0f3..076986a 100644
--- a/fw/fe310/eos/dev/egpio.c
+++ b/fw/fe310/eos/dev/egpio.c
@@ -177,12 +177,10 @@ static int handle_egpio_evt(uint8_t chip_id) {
return EOS_OK;
}
-static void handle_evt(unsigned char type, unsigned char *buffer, uint16_t len) {
+static void handle_evt(unsigned char type, EOSMessage *msg, uint16_t len) {
int rv;
- type &= ~EOS_EVT_MASK;
-
- switch (type) {
+ switch (type & ~EOS_EVT_MASK) {
case EOS_EGPIO_ETYPE_INT: {
rv = handle_egpio_evt(EGPIO_CHIP_FXL0);
if (rv) goto handle_evt_fin;
@@ -217,6 +215,11 @@ handle_evt_fin:
if (rv < 0) EOS_LOG(EOS_LOG_ERR, "CTP/EVE HANDLE INTR ERR:%d\n", rv);
break;
}
+
+ default:
+ eos_evtq_bad_handler(type, msg, len);
+ break;
+
}
}