#define DEBUG_LOG_MODULE_NAME "PROV APP"
#define DEBUG_LOG_MAX_LEVEL LVL_INFO
static uint32_t start_provisioning(void)
{
}
const app_lib_joining_received_beacon_t * select_joining_beacon(
const app_lib_joining_received_beacon_t * beacons)
{
const app_lib_joining_received_beacon_t * strongest_beacon = NULL;
int16_t strongest_rssi = INT16_MIN;
while (beacons != NULL)
{
if (beacons->rssi > strongest_rssi)
{
strongest_beacon = beacons;
strongest_rssi = beacons->rssi;
}
beacons = beacons->next;
}
return strongest_beacon;
}
void user_data_cb(uint32_t
id,
CborType type, uint8_t * data, uint8_t len)
{
LOG(
LVL_INFO,
"User Data, id:%d, type:%d, data:",
id, type);
}
{
LOG(
LVL_INFO,
"Provisioning ended with result: %d", res);
return true;
}
{
(void) button_id;
(void) event;
2000);
}
void usart_rx_cb(uint8_t * ch, size_t n)
{
if ((n == 1) && (*ch == ' '))
{
button_0_cb(0, 0);
}
}
{
(void) functions;
lib_settings->getNodeAddress(&node_addr);
lib_settings->getNetworkAddress(&net_addr);
lib_settings->getNetworkChannel(&net_channel);
lib_settings->getNodeRole(&node_role);
.user_data_cb = user_data_cb,
.beacon_joining_cb = select_joining_beacon };
lib_state->startStack();
}
#define APP_SCHEDULER_STOP_TASK
Value to return from task to remove it.
app_scheduler_res_e App_Scheduler_addTask_execTime(task_cb_f cb, uint32_t delay_ms, uint32_t exec_time_us)
Add a task.
#define APP_SCHEDULER_SCHEDULE_ASAP
Value to return from task or as initial time to be executed ASAP.
app_setup_res_e App_Setup(void)
Setup configuration from application persistent memory.
#define LOG_BUFFER(level, buffer, size)
Print a buffer if its severity is lower or equal to DEBUG_LOG_MAX_LEVEL.
#define LVL_DEBUG
Macros to define several log levels: Debug, Info, Warning, Error.
#define LOG(level, fmt,...)
Print a log message if its severity is lower or equal to DEBUG_LOG_MAX_LEVEL.
provisioning_res_e
Provisioning result.
provisioning_ret_e Provisioning_start(void)
Start the provisioning process.
provisioning_end_cb_f end_cb
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.
void Usart_setEnabled(bool enabled)
Enable or disable USART Enables or disables USART clock and configures GPIO pins.
void Usart_receiverOn(void)
Enable USART Receiver.
void Usart_enableReceiver(serial_rx_callback_f callback)
Enable UART receiver Set callback handler for character RX event Enables interrupt source and event,...
List of global functions, passed to App_entrypoint()
uint32_t app_lib_settings_net_addr_t
Network address type definition.
uint8_t app_lib_settings_role_t
Node role type.
uint8_t app_lib_settings_net_channel_t
Channel type definition.