properly handle _cfg_t pointers for ISR handling scheme

This commit is contained in:
Morgan 'ARR\!' Allen 2021-12-07 18:06:37 -08:00
parent c8beb458f6
commit d93f3399bc

View file

@ -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);