We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
IrqFired
1 parent 83cd9da commit f0aa093Copy full SHA for f0aa093
src/radio/sx126x/radio.c
@@ -1212,13 +1212,14 @@ void RadioOnDioIrq( void* context )
1212
1213
void RadioIrqProcess( void )
1214
{
1215
- if( IrqFired == true )
1216
- {
1217
- CRITICAL_SECTION_BEGIN( );
1218
- // Clear IRQ flag
1219
- IrqFired = false;
1220
- CRITICAL_SECTION_END( );
+ CRITICAL_SECTION_BEGIN( );
+ // Clear IRQ flag
+ const bool isIrqFired = IrqFired;
+ IrqFired = false;
+ CRITICAL_SECTION_END( );
1221
+ if( isIrqFired == true )
1222
+ {
1223
uint16_t irqRegs = SX126xGetIrqStatus( );
1224
SX126xClearIrqStatus( irqRegs );
1225
0 commit comments