Wirepas SDK
minimal_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 minimal app to start the stack
*/
#include <stdlib.h>
#include "
api.h
"
#include "
node_configuration.h
"
void
App_init(
const
app_global_functions_t
* functions)
{
// Basic configuration of the node with a unique node address
if
(
configureNodeFromBuildParameters
() !=
APP_RES_OK
)
{
// Could not configure the node
// It should not happen except if one of the config value is invalid
return
;
}
/*
* Start the stack.
* This is really important step, otherwise the stack will stay stopped and
* will not be part of any network. So the device will not be reachable
* without reflashing it
*/
lib_state->startStack();
}
node_configuration.h
APP_RES_OK
@ APP_RES_OK
Definition:
wms_app.h:204
app_global_functions_t
List of global functions, passed to App_entrypoint()
Definition:
wms_app.h:157
configureNodeFromBuildParameters
__STATIC_INLINE app_res_e configureNodeFromBuildParameters()
Wrapper on top of configureNode to get parameters from build system and hardcoded values from chip (f...
Definition:
node_configuration.h:233
api.h