diff --git a/main/esp32-lora.c b/main/esp32-lora.c index b9c522d..6a8d4e9 100644 --- a/main/esp32-lora.c +++ b/main/esp32-lora.c @@ -255,7 +255,7 @@ void lora32_set_coding_rate(lora32_cfg_t *lora, uint8_t d) { lora32_write_reg(lora, REG_MODEM_CONFIG_1, (lora32_read_reg(lora, REG_MODEM_CONFIG_1) & 0xF1) | (cr << 1)); } -static void IRAM_ATTR lora32_receive_task(void *arg) { +static void IRAM_ATTR lora32_dio0_task(void *arg) { lora32_cfg_t *lora = (lora32_cfg_t*)arg; ESP_LOGD(TAG, "starting DIO0 handler task"); @@ -397,10 +397,7 @@ uint8_t lora32_init(lora32_cfg_t *lora) { gpio_isr_handler_add(CONFIG_LORA32_DIO0_PIN, lora32_on_dio0, (void*)lora); // this should probably be high priority - xTaskCreate(&lora32_receive_task, "lora32_receive_task", 14048, (void*)lora, 6, NULL); - - // TODO comment and probably change 0x00 to a macro - lora32_write_reg(lora, REG_DIO_MAPPING_1, 0x00); + xTaskCreate(&lora32_dio0_task, "lora32_dio0_task", 14048, (void*)lora, 6, NULL); } return 1;