diff options
author | Uros Majstorovic <majstor@majstor.org> | 2019-10-15 18:11:40 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2019-10-15 18:11:40 +0200 |
commit | edec491d59697a635ddce7a19a870dd3e8d2f3ed (patch) | |
tree | 8b5c00103609eabe9fdc89169c825f544aca41d5 /code/fe310/eos/ecp.c | |
parent | 850ce8bb7a447e1d2500d5dac0b0003bb4412c37 (diff) |
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
Diffstat (limited to 'code/fe310/eos/ecp.c')
-rw-r--r-- | code/fe310/eos/ecp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/code/fe310/eos/ecp.c b/code/fe310/eos/ecp.c index 44d9a47..85539f5 100644 --- a/code/fe310/eos/ecp.c +++ b/code/fe310/eos/ecp.c @@ -13,11 +13,11 @@ static ECPSocket *_sock = NULL; -static void timer_handler(unsigned char type, unsigned char *buffer, uint16_t len) { +static void timer_handler(unsigned char type) { ecp_cts_t next = ecp_timer_exe(_sock); if (next) { uint32_t tick = next * (uint64_t)RTC_FREQ / 1000; - eos_timer_set(tick, 1); + eos_timer_set(tick, EOS_TIMER_ETYPE_ECP); } } @@ -59,8 +59,8 @@ int ecp_init(ECPContext *ctx) { rv = ecp_ctx_create_vconn(ctx); if (rv) return rv; + eos_timer_set_handler(EOS_TIMER_ETYPE_ECP, timer_handler, EOS_EVT_FLAG_NET_BUF_ACQ); /* XXX */ - eos_evtq_set_handler(EOS_EVT_TIMER, timer_handler, EOS_EVT_FLAG_NET_BUF_ACQ); // eos_net_set_handler(EOS_NET_DATA_PKT, packet_handler, 0); return ECP_OK; } |