Skip to content

Commit ff9dfea

Browse files
authored
Signal NVM data change in LoRaMacMc* functions (#1340)
The various multicast management functions provided by the library modify data stored in NVM and thus need to signal to the NVM layer when the data changes.
1 parent 8402ca4 commit ff9dfea

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/mac/LoRaMac.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4917,6 +4917,7 @@ LoRaMacStatus_t LoRaMacMcChannelSetup( McChannelParams_t *channel )
49174917
}
49184918

49194919
Nvm.MacGroup2.MulticastChannelList[channel->GroupID].ChannelParams = *channel;
4920+
MacCtx.MacFlags.Bits.NvmHandle = 1;
49204921

49214922
if( channel->IsRemotelySetup == true )
49224923
{
@@ -4969,6 +4970,7 @@ LoRaMacStatus_t LoRaMacMcChannelDelete( AddressIdentifier_t groupID )
49694970
memset1( ( uint8_t* )&channel, 0, sizeof( McChannelParams_t ) );
49704971

49714972
Nvm.MacGroup2.MulticastChannelList[groupID].ChannelParams = channel;
4973+
MacCtx.MacFlags.Bits.NvmHandle = 1;
49724974
return LORAMAC_STATUS_OK;
49734975
}
49744976

@@ -5040,6 +5042,7 @@ LoRaMacStatus_t LoRaMacMcChannelSetupRxParams( AddressIdentifier_t groupID, McRx
50405042
{
50415043
// Apply parameters
50425044
Nvm.MacGroup2.MulticastChannelList[groupID].ChannelParams.RxParams = *rxParams;
5045+
MacCtx.MacFlags.Bits.NvmHandle = 1;
50435046
}
50445047
else
50455048
{

0 commit comments

Comments
 (0)