sandeepmistry / arduino-LoRa

An Arduino library for sending and receiving data using LoRa radios.
MIT License
1.67k stars 634 forks source link

Don't reset REG_FIFO_ADDR_PTR #269

Closed torntrousers closed 5 years ago

torntrousers commented 5 years ago

As per the discussion in https://github.com/sandeepmistry/arduino-LoRa/issues/268 and https://github.com/sandeepmistry/arduino-LoRa/issues/218

morganrallen commented 5 years ago

After digging into the datasheet I cannot find a compelling reason resetting REG_FIFO_ADDR_PTR should be done.

mchacher commented 5 years ago

I do confirm. could be good as well to create a task that is calling the callback function instead of having this call in the ISR which is not safe at all. Sharing below the code I have used on my side. Hope this can help.

volatile int _dioRiseInterruptCounter = 0; portMUX_TYPE mutexDioRise = portMUX_INITIALIZER_UNLOCKED;

/**

/**

morganrallen commented 5 years ago

This isn't related to this pull request.