From d93f3399bceb6a7fd4effc4aeae7c9045716331e Mon Sep 17 00:00:00 2001 From: "Morgan 'ARR\\!' Allen" Date: Tue, 7 Dec 2021 18:06:37 -0800 Subject: [PATCH] properly handle _cfg_t pointers for ISR handling scheme --- main/esp32-lora.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/esp32-lora.c b/main/esp32-lora.c index eb46995..6383eef 100644 --- a/main/esp32-lora.c +++ b/main/esp32-lora.c @@ -420,7 +420,7 @@ void lora32_read_data(lora32_cfg_t *lora, uint8_t *data) { } static void IRAM_ATTR lora32_on_dio0(void *arg) { - xQueueSend(dio_event_queue, arg, (TickType_t)0); + xQueueSendFromISR(dio_event_queue, (void*)&arg, pdFALSE); } uint8_t lora32_spi_init(lora32_cfg_t *lora) { @@ -540,7 +540,7 @@ uint8_t lora32_init(lora32_cfg_t *lora) { // enable global ISR service gpio_install_isr_service(0); - dio_event_queue = xQueueCreate(10, sizeof(lora32_cfg_t)); + dio_event_queue = xQueueCreate(10, sizeof(lora32_cfg_t *)); // this should probably be high priority xTaskCreate(&lora32_dio_task, "lora32_dio_task", 4096, NULL, 6, &dio_task_handle);