diff options
author | Uros Majstorovic <majstor@majstor.org> | 2019-12-08 17:47:58 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2019-12-08 17:47:58 +0100 |
commit | 602d0d803eb9607dcd949f3ea5ff27c14db4085b (patch) | |
tree | d48d217a9a596a757a7e5fc6b4ee46a33dc7ab04 /code/esp32/components/eos/cell_modem.c | |
parent | 078898fb69ec692e8a051746f423ad3171ff4d7c (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/cell_modem.c')
-rw-r--r-- | code/esp32/components/eos/cell_modem.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/code/esp32/components/eos/cell_modem.c b/code/esp32/components/eos/cell_modem.c index 26748a1..2534eb1 100644 --- a/code/esp32/components/eos/cell_modem.c +++ b/code/esp32/components/eos/cell_modem.c @@ -30,6 +30,8 @@ static QueueHandle_t uart_queue; // static uint8_t *uart_data[UART_BUF_SIZE]; +static const char *TAG = "EOS MODEM"; + static void uart_event_task(void *pvParameters) { char mode = 0; uart_event_t event; @@ -58,6 +60,7 @@ static void uart_event_task(void *pvParameters) { default: break; } + break; case UART_EVENT_MAX: /* Mode change @@ -113,9 +116,10 @@ void eos_modem_init(void) { gpio_set_level(UART_GPIO_DTR, 1); // Create a task to handle uart event from ISR - xTaskCreate(uart_event_task, "uart_event_task", 2048, NULL, EOS_IRQ_PRIORITY_UART, NULL); + xTaskCreate(uart_event_task, "uart_event", EOS_TASK_SSIZE_UART, NULL, EOS_TASK_PRIORITY_UART, NULL); eos_net_set_handler(EOS_NET_MTYPE_CELL, modem_handler); + ESP_LOGI(TAG, "INIT"); } ssize_t eos_modem_write(void *data, size_t size) { @@ -126,5 +130,5 @@ void eos_modem_set_mode(char mode) { uart_event_t evt; evt.type = UART_EVENT_MAX; /* my type */ evt.size = mode; - xQueueSend(&uart_queue, (void *)&evt, portMAX_DELAY); + xQueueSend(uart_queue, (void *)&evt, portMAX_DELAY); } |