Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Examples

Example 1

This example illustrates how to enable and disable trace logs.

#include "platform.h"
#include "at_ble_api.h"
#include "at_ble_trace.h"
int main(void)
{
at_ble_status_t enuStatus;
...
...
enuStatus = at_ble_init(&pf_cfg);
...
...
return 0;
}
*

Example 2

This example illustrates how to use different levels of trace logs.

#include "platform.h"
#include "at_ble_api.h"
#include "at_ble_trace.h"
int main(void)
{
at_ble_status_t enuStatus;
trace_set_level(TRACE_LVL_ERR|TRACE_LVL_FUN); //ONLY, Errors and Functions entrys will be displayed
enuStatus = at_ble_init(&pf_cfg);
trace_set_level(TRACE_LVL_INFO); //ONLY, info logs will be displayed
enuStatus = at_ble_addr_set(&addr);
trace_set_level(TRACE_LVL_ALL); //All logs will be displayed
enuStatus = at_ble_addr_set(&addr);
trace_set_level(TRACE_LVL_DISABLE); //None will be displayed
...
...
return 0;
}
*