File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -1360,13 +1360,15 @@ static void ProcessRadioRxTimeout( void )
13601360
13611361static void LoRaMacHandleIrqEvents ( void )
13621362{
1363- LoRaMacRadioEvents_t events = LoRaMacRadioEvents ;
1363+ LoRaMacRadioEvents_t events ;
1364+
1365+ CRITICAL_SECTION_BEGIN ( );
1366+ events = LoRaMacRadioEvents ;
1367+ LoRaMacRadioEvents .Value = 0 ;
1368+ CRITICAL_SECTION_END ( );
1369+
13641370 if ( events .Value != 0 )
13651371 {
1366- CRITICAL_SECTION_BEGIN ( );
1367- LoRaMacRadioEvents .Value = 0 ;
1368- CRITICAL_SECTION_END ( );
1369-
13701372 if ( events .Events .TxDone == 1 )
13711373 {
13721374 ProcessRadioTxDone ( );
Original file line number Diff line number Diff line change @@ -1666,13 +1666,15 @@ void LoRaMacClassBSetMulticastPeriodicity( MulticastCtx_t* multicastChannel )
16661666void LoRaMacClassBProcess ( void )
16671667{
16681668#ifdef LORAMAC_CLASSB_ENABLED
1669- LoRaMacClassBEvents_t events = LoRaMacClassBEvents ;
1669+ LoRaMacClassBEvents_t events ;
1670+
1671+ CRITICAL_SECTION_BEGIN ( );
1672+ events = LoRaMacClassBEvents ;
1673+ LoRaMacClassBEvents .Value = 0 ;
1674+ CRITICAL_SECTION_END ( );
1675+
16701676 if ( events .Value != 0 )
16711677 {
1672- CRITICAL_SECTION_BEGIN ( );
1673- LoRaMacClassBEvents .Value = 0 ;
1674- CRITICAL_SECTION_END ( );
1675-
16761678 if ( events .Events .Beacon == 1 )
16771679 {
16781680 LoRaMacClassBProcessBeacon ( );
You can’t perform that action at this time.
0 commit comments