Wirepas SDK
dualmcu_app/app.c
/* Copyright 2017 Wirepas Ltd. All Rights Reserved.
*
* See file LICENSE.txt for full license details.
*
*/
/*
* \file app.c
* \brief This file is a template to Dual MCU API app for all paltforms
*/
#include <stdlib.h>
#include <api.h>
#include "app_setup.h"
#include "wms_settings.h"
#ifdef DUALMCU_APP_KEY_MGMT
#include "provisioning.h"
#endif
#include "dualmcu_lib.h"
void App_init(const app_global_functions_t * functions)
{
(void) functions;
#ifdef DUALMCU_APP_KEY_MGMT
if (lib_settings->getNodeRole(&role) == APP_RES_OK)
{
{
lib_settings->keyManagementConfiguration(
.flags = {
.apply_flags = 1,
.app_key_management_supported = 1,
.app_key_management_configured = 1
}
}
);
}
else
{
}
}
#endif
Dualmcu_lib_init(UART_BAUDRATE, UART_FLOWCONTROL);
}
app_setup_res_e App_Setup(void)
Setup configuration from application persistent memory.
dualmcu_lib_res_e Dualmcu_lib_init(uint32_t baudrate, bool flow_ctrl)
Initialize Dualmcu_lib.
void Provisioning_register_csap_handlers(void)
Register the Remote API CSAP handlers for the provisioning_config attribute (0xC001) without initiali...
provisioning_ret_e Provisioning_init_from_storage(provisioning_conf_t *conf)
Initialize the provisioning process with provisioning settings from the secure storage.
This structure contains all provisioning related parameters.
@ APP_RES_OK
Definition wms_app.h:204
List of global functions, passed to App_entrypoint()
Definition wms_app.h:158
uint8_t app_lib_settings_role_t
Node role type.
@ APP_LIB_SETTINGS_ROLE_SINK_LL
@ APP_LIB_SETTINGS_ROLE_SINK_LE
Structure to hold key management configuration information for the settings API.