summaryrefslogtreecommitdiff
path: root/code/fe310/eos/ecp.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2019-10-13 02:05:03 +0200
committerUros Majstorovic <majstor@majstor.org>2019-10-13 02:05:03 +0200
commit8c6c68e92d6b4c8aa5e2fcc784ed52da40845acc (patch)
tree0251bea9be01701c488f9d8719b52eeb2a64855d /code/fe310/eos/ecp.c
parent2a39fdf6d943f5738ba174368053a86304b0d8fa (diff)
net refactor; rename cmd -> type
Diffstat (limited to 'code/fe310/eos/ecp.c')
-rw-r--r--code/fe310/eos/ecp.c7
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;
}