diff options
author | Uros Majstorovic <majstor@majstor.org> | 2019-12-06 20:04:08 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2019-12-06 20:04:08 +0100 |
commit | 0bcbb62eb408e6fcbfe78fbc2756dfb1b9ae6a37 (patch) | |
tree | 8517595e723686fd8954f0640c5fc40c36e88a67 /code/fe310/eos/wifi.c | |
parent | bc37c471fbb233a2a17119091b10f7adf8045a95 (diff) |
net refactor: alloc reverted to take void arg; EOS_NET_FLAGs renamed
Diffstat (limited to 'code/fe310/eos/wifi.c')
-rw-r--r-- | code/fe310/eos/wifi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/code/fe310/eos/wifi.c b/code/fe310/eos/wifi.c index 95fec7d..67682aa 100644 --- a/code/fe310/eos/wifi.c +++ b/code/fe310/eos/wifi.c @@ -46,7 +46,7 @@ void eos_wifi_init(void) { void eos_wifi_connect(const char *ssid, const char *pass) { int ssid_len = strlen(ssid); int pass_len = strlen(pass); - unsigned char *buffer = eos_net_alloc(0); + unsigned char *buffer = eos_net_alloc(); buffer[0] = EOS_WIFI_MTYPE_CONNECT; strcpy(buffer+1, ssid); @@ -57,7 +57,7 @@ void eos_wifi_connect(const char *ssid, const char *pass) { } void eos_wifi_disconnect(void) { - unsigned char *buffer = eos_net_alloc(0); + unsigned char *buffer = eos_net_alloc(); buffer[0] = EOS_WIFI_MTYPE_DISCONNECT; eos_net_send(EOS_NET_MTYPE_WIFI, buffer, 1, 0); } @@ -69,8 +69,8 @@ void eos_wifi_set_handler(int mtype, eos_wifi_fptr_t handler, uint8_t flags) { if (flags) { uint16_t flag = (uint16_t)1 << mtype; - if (flags & EOS_NET_FLAG_BUF_FREE) wifi_handler_flags_buf_free |= flag; - if (flags & EOS_NET_FLAG_BUF_ACQ) wifi_handler_flags_buf_acq |= flag; + if (flags & EOS_NET_FLAG_BFREE) wifi_handler_flags_buf_free |= flag; + if (flags & EOS_NET_FLAG_BACQ) wifi_handler_flags_buf_acq |= flag; } wifi_handler[mtype] = handler; } |