Skip to content

Commit 535da61

Browse files
committed
Added missing initialization functions call for the new modules.
SecureElementInit, LoRaMacCryptoInit, LoRaMacCommandsInit, LoRaMacFCntHandlerInit
1 parent 0128fc8 commit 535da61

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/mac/LoRaMac.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2878,6 +2878,29 @@ LoRaMacStatus_t LoRaMacInitialization( LoRaMacPrimitives_t* primitives, LoRaMacC
28782878
params.NvmCtx = NULL;
28792879
RegionInitDefaults( MacCtx.NvmCtx->Region, &params );
28802880

2881+
// Initialize the Secure Element driver
2882+
if( SecureElementInit( NULL ) != SECURE_ELEMENT_SUCCESS )
2883+
{
2884+
return LORAMAC_STATUS_CRYPTO_ERROR;
2885+
}
2886+
2887+
// Initialize Crypto module
2888+
if( LoRaMacCryptoInit( NULL ) != LORAMAC_CRYPTO_SUCCESS )
2889+
{
2890+
return LORAMAC_STATUS_CRYPTO_ERROR;
2891+
}
2892+
2893+
// Initialize MAC commands module
2894+
if( LoRaMacCommandsInit( NULL ) != LORAMAC_COMMANDS_SUCCESS )
2895+
{
2896+
return LORAMAC_STATUS_MAC_COMMAD_ERROR;
2897+
}
2898+
2899+
// Initialize FCnt Handler module
2900+
if( LoRaMacFCntHandlerInit( NULL ) != LORAMAC_FCNT_HANDLER_SUCCESS )
2901+
{
2902+
return LORAMAC_STATUS_FCNT_HANDLER_ERROR;
2903+
}
28812904

28822905
// Set multicast downlink counter reference
28832906
LoRaMacFCntHandlerSetMulticastReference( MacCtx.NvmCtx->MulticastChannelList );

0 commit comments

Comments
 (0)