SecureElementStatus_t SecureElementRestoreNvmCtx( void* seNvmCtx )
{
    lr1110_crypto_status_t status = LR1110_CRYPTO_STATUS_ERROR;

    if( seNvmCtx == NULL )
    {
        return SECURE_ELEMENT_ERROR_NPE;
    }

    // Restore lr1110 crypto context
    lr1110_crypto_restore_from_flash( &LR1110, &status );

    // Restore nvm context
    memcpy1( ( uint8_t* ) &SeContext, ( uint8_t* ) seNvmCtx, sizeof( SeContext ) );

    return ( SecureElementStatus_t ) status;
}
SecureElementStatus_t SecureElementRestoreNvmCtx( void* seNvmCtx )
{
    lr1110_crypto_status_t status = LR1110_CRYPTO_STATUS_ERROR;

    if( seNvmCtx == NULL )
    {
        return SECURE_ELEMENT_ERROR_NPE;
    }

     
    lr1110_crypto_restore_from_flash( &LR1110, &status );

     
    memcpy1( ( uint8_t* ) &SeContext, ( uint8_t* ) seNvmCtx, sizeof( SeContext ) );

    return ( SecureElementStatus_t ) status;
}