jgromes / RadioLib

Universal wireless communication library for embedded devices
https://jgromes.github.io/RadioLib/
MIT License
1.58k stars 395 forks source link

[PHY, modules, LoRaWAN] Generalize IRQ checks #1188

Closed StevenCellist closed 3 months ago

StevenCellist commented 3 months ago

Instead of using a specific isRxTimeout() function, this PR adds a general function isIrqSet() for most common IRQ values on a range of modules (SX126x, SX127x, SX128x and LR11x0). This makes it easy to retrieve low-level IRQ status flags while retaining the radio abstraction. I am not sure if / how to implement this for other classes; they seem to work in a different way.

As the LoRaWAN stack used the function isRxTimeout(), it has been modified accordingly and is checked to run as usual.

jgromes commented 3 months ago

All looks good now - merged, thanks!