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/ecp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'code/fe310/eos/ecp.c') 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; } -- cgit v1.2.3