diff options
Diffstat (limited to 'code/fe310/eos/ecp.c')
-rw-r--r-- | code/fe310/eos/ecp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/code/fe310/eos/ecp.c b/code/fe310/eos/ecp.c index 9297ccd..44d9a47 100644 --- a/code/fe310/eos/ecp.c +++ b/code/fe310/eos/ecp.c @@ -13,7 +13,7 @@ static ECPSocket *_sock = NULL; -static void timer_handler(unsigned char cmd, unsigned char *buffer, uint16_t len) { +static void timer_handler(unsigned char type, unsigned char *buffer, uint16_t len) { ecp_cts_t next = ecp_timer_exe(_sock); if (next) { uint32_t tick = next * (uint64_t)RTC_FREQ / 1000; @@ -21,7 +21,7 @@ static void timer_handler(unsigned char cmd, unsigned char *buffer, uint16_t len } } -static void packet_handler(unsigned char cmd, unsigned char *buffer, uint16_t len) { +static void packet_handler(unsigned char type, unsigned char *buffer, uint16_t len) { ECPNetAddr addr; size_t addr_len = sizeof(addr.host) + sizeof(addr.port); @@ -59,8 +59,9 @@ int ecp_init(ECPContext *ctx) { rv = ecp_ctx_create_vconn(ctx); if (rv) return rv; + /* XXX */ eos_evtq_set_handler(EOS_EVT_TIMER, timer_handler, EOS_EVT_FLAG_NET_BUF_ACQ); - eos_net_set_handler(EOS_NET_CMD_PKT, packet_handler, 0); + // eos_net_set_handler(EOS_NET_DATA_PKT, packet_handler, 0); return ECP_OK; } |