summaryrefslogtreecommitdiff
path: root/code/esp32/components/eos/sock.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2019-12-08 17:47:58 +0100
committerUros Majstorovic <majstor@majstor.org>2019-12-08 17:47:58 +0100
commit602d0d803eb9607dcd949f3ea5ff27c14db4085b (patch)
treed48d217a9a596a757a7e5fc6b4ee46a33dc7ab04 /code/esp32/components/eos/sock.c
parent078898fb69ec692e8a051746f423ad3171ff4d7c (diff)
fixed uart data relay bug; fixed all xCreateTask to use new macros for stack size; fixed err type for msgq;
Diffstat (limited to 'code/esp32/components/eos/sock.c')
-rw-r--r--code/esp32/components/eos/sock.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/code/esp32/components/eos/sock.c b/code/esp32/components/eos/sock.c
index ee3c6a3..8994b62 100644
--- a/code/esp32/components/eos/sock.c
+++ b/code/esp32/components/eos/sock.c
@@ -78,7 +78,7 @@ static ssize_t t_recvfrom(int sock, void *msg, size_t msg_size, EOSNetAddr *addr
return recvlen;
}
-static void sock_receiver(void *pvParameters) {
+static void udp_rcvr_task(void *pvParameters) {
EOSNetAddr addr;
uint8_t esock = (uint8_t)pvParameters;
int sock = _socks[esock-1];
@@ -136,8 +136,8 @@ static void sock_handler(unsigned char type, unsigned char *buffer, uint16_t siz
}
xSemaphoreGive(mutex);
}
- // xTaskCreatePinnedToCore(&sock_receiver, "sock_receiver", 2048, NULL, EOS_IRQ_PRIORITY_UDP_RCVR, NULL, 1);
- xTaskCreate(&sock_receiver, "sock_receiver", 2048, (void *)esock, EOS_IRQ_PRIORITY_UDP_RCVR, NULL);
+ // xTaskCreatePinnedToCore(&sock_receiver, "sock_receiver", EOS_TASK_SSIZE_UDP_RCVR, (void *)esock, EOS_TASK_PRIORITY_UDP_RCVR, NULL, 1);
+ xTaskCreate(&udp_rcvr_task, "udp_rcvr", EOS_TASK_SSIZE_UDP_RCVR, (void *)esock, EOS_TASK_PRIORITY_UDP_RCVR, NULL);
rbuf = eos_net_alloc();
rbuf[0] = EOS_SOCK_MTYPE_OPEN_DGRAM;
rbuf[1] = esock;
@@ -159,4 +159,5 @@ void eos_sock_init(void) {
mutex = xSemaphoreCreateBinary();
xSemaphoreGive(mutex);
eos_net_set_handler(EOS_NET_MTYPE_SOCK, sock_handler);
+ ESP_LOGI(TAG, "INIT");
} \ No newline at end of file