Nordic Semiconductor nRF5 AirFuel SDK  version 2.2.0
pru.c File Reference
#include <stdint.h>
#include <string.h>
#include "nordic_common.h"
#include "nrf_assert.h"
#include "pru.h"
#include "pru_sensors.h"
#include "pru_hw_config.h"
#include "pru_test_mux.h"
#include "pru_sm.h"
#include "pru_adv.h"
#include "pru_config.h"
#include "ble_hci.h"
#include "pru_pstorage.h"

Go to the source code of this file.

Functions

API implementation
void pru_init (app_sm_evt_handler_t sm_handler)
 Initialize PRU. This function must be called before any other PRU function can be called. More...
 
void pru_start (void)
 Enable the PRU profile. When enabled sensor reading and signal generation will be enabled.
 
void pru_on_ble_evt (ble_evt_t *p_ble_evt)
 Handle BLE event.
 
void terminate (void)
 Needs to be implemented by application. Perform all requried actions before jump to DFU application can be done.
 
bool dfu_check (void)
 Needs to be implemented by application. Check if it is OK to jump to the DFU application. More...
 

Static functions and variables

static uint16_t m_conn_handle = BLE_CONN_HANDLE_INVALID
 
static ble_wpts_t m_wpts
 
static uint32_t m_vrect_high_duration_ms
 
static pru_sm_state_vars_t m_state_variables
 
static bool m_adv_allowed = false
 
static app_sm_evt_handler_t m_app_sm_evt_handler = NULL
 
static bool m_advertising
 
 APP_TIMER_DEF (m_pru_sensors_timer_single_shot_id)
 
 APP_TIMER_DEF (m_p_pru_sensors_timer_id)
 
static void m_advertising_start (void)
 Start advertising. More...
 
static void m_sys_evt_dispatch (uint32_t event)
 Dispatches a System stack event to flash storage module. More...
 
static void m_gap_params_init (void)
 GAP initialization. More...
 
static void m_handle_event (pru_sm_signal_type_t evt)
 Handle PRU SM events that require profile handling. More...
 
static void m_on_sm_event (pru_sm_signal_type_t evt)
 Forward events to the PRU state machine. Also handles the resulting request event. More...
 
static void m_wpts_evt_handler (ble_wpts_t *p_wpts, ble_wpts_evt_t *p_evt)
 WPT Service event handler. More...
 
static void on_ble_evt (ble_evt_t *p_ble_evt)
 BLE stack GAP event handler. More...
 
static void m_ble_wpts_init (void)
 Initialize the WPT Service.
 
static uint32_t m_ble_wpts_pru_dynamic_set (ble_wpts_t *p_wpts, const pru_sensor_data_t *p_pru_sensor_data)
 Set PRU dynamic data. More...
 
static void m_sensors_timer_handler (void *p_context)
 Sensors measurement timer timeout handler. More...
 
static void m_sensors_timer_trigger ()
 Start timer for reading sensors one time.
 
static void m_sensors_timer_start (uint16_t period_ms)
 Start timer for reading sensors periodically.
 
static void m_timers_init (void)
 Instanicate timers used in this file.
 

Function Documentation

APP_TIMER_DEF ( m_pru_sensors_timer_single_shot_id  )

App timer ID of single shot measurement.

APP_TIMER_DEF ( m_p_pru_sensors_timer_id  )

App timer ID of repeating sensor measurement.

static void m_advertising_start ( void  )
static

Start advertising.

Initialize advertisement data, and start advertising.

Definition at line 57 of file pru.c.

58 {
59  uint32_t err_code;
60  ble_gap_adv_params_t adv_params;
61 
62  err_code = pru_advdata_set(&m_wpts);
63  APP_ERROR_CHECK(err_code);
64 
65  memset(&adv_params, 0, sizeof(adv_params));
66 
67  // We always use indirect advertising
68  adv_params.type = BLE_GAP_ADV_TYPE_ADV_IND;
69  adv_params.p_peer_addr = NULL;
70  adv_params.fp = BLE_GAP_ADV_FP_ANY;
71  adv_params.interval = PRU_ADV_INTERVAL;
72  adv_params.timeout = BLE_GAP_ADV_TIMEOUT_LIMITED_MAX;
73 
74  err_code = sd_ble_gap_adv_start(&adv_params);
75  m_advertising = true;
76 
77  if(err_code != NRF_ERROR_INVALID_STATE && err_code != NRF_ERROR_BUSY)
78  {
79  APP_ERROR_CHECK(err_code);
80  }
81 }
#define PRU_ADV_INTERVAL
Definition: pru_config.h:24
uint32_t pru_advdata_set(ble_wpts_t *p_wpts)
Advertising functionality initialization.
Definition: pru_adv.c:27
static bool m_advertising
Definition: pru.c:45
static ble_wpts_t m_wpts
Definition: pru.c:38
static void m_sys_evt_dispatch ( uint32_t  event)
static

Dispatches a System stack event to flash storage module.

This function is called after a system event has been received.

Parameters
[in]eventBluetooth stack event.

Definition at line 90 of file pru.c.

91 {
93 }
void pru_pstorage_sys_evt_handler(uint32_t event)
Handles system callbacks.
Definition: pru_pstorage.c:51
static void m_gap_params_init ( void  )
static

GAP initialization.

This function shall be used to setup all the necessary GAP (Generic Access Profile) parameters of the device. It also sets the permissions and appearance.

Definition at line 101 of file pru.c.

102 {
103  uint32_t err_code;
104  ble_gap_conn_params_t gap_conn_params;
105  ble_gap_conn_sec_mode_t sec_mode;
106 
107  BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&sec_mode);
108  err_code = sd_ble_gap_device_name_set(&sec_mode, (const uint8_t *)PRU_ADV_DEVICE_NAME, strlen(PRU_ADV_DEVICE_NAME));
109  APP_ERROR_CHECK(err_code);
110 
111  err_code = sd_ble_gap_appearance_set(BLE_APPEARANCE_UNKNOWN);
112  APP_ERROR_CHECK(err_code);
113 
114  err_code = sd_ble_gap_tx_power_set(PRU_TX_POWER_LEVEL);
115  APP_ERROR_CHECK(err_code);
116 
117  memset(&gap_conn_params, 0, sizeof(gap_conn_params));
118 
119  gap_conn_params.min_conn_interval = PRU_MIN_CONN_INTERVAL;
120  gap_conn_params.max_conn_interval = PRU_MAX_CONN_INTERVAL;
121  gap_conn_params.slave_latency = PRU_SLAVE_LATENCY;
122  gap_conn_params.conn_sup_timeout = PRU_CONN_SUP_TIMEOUT;
123 
124  err_code = sd_ble_gap_ppcp_set(&gap_conn_params);
125  APP_ERROR_CHECK(err_code);
126 }
#define PRU_CONN_SUP_TIMEOUT
Definition: pru_config.h:31
#define PRU_TX_POWER_LEVEL
Definition: pru_hw_config.h:38
#define PRU_ADV_DEVICE_NAME
Definition: pru_config.h:23
#define PRU_SLAVE_LATENCY
Definition: pru_config.h:30
#define PRU_MAX_CONN_INTERVAL
Definition: pru_config.h:29
#define PRU_MIN_CONN_INTERVAL
Definition: pru_config.h:28
static void m_handle_event ( pru_sm_signal_type_t  evt)
static

Handle PRU SM events that require profile handling.

Parameters
evtThe event

Definition at line 132 of file pru.c.

133 {
134  uint32_t err_code;
135 
136  switch(evt)
137  {
139  if(m_state_variables.current_state == PRU_SM_STATE_BOOT || m_state_variables.current_state == PRU_SM_STATE_NULL)
140  {
143 
146  }
147  break;
148 
150  m_adv_allowed = false;
151  if(m_state_variables.current_state == PRU_SM_STATE_PRU_ON)
152  {
153  err_code = pru_tmux_vout_enable_set(false);
154  APP_ERROR_CHECK(err_code);
155  ASSERT(m_advertising);
156  (void) sd_ble_gap_adv_stop(); // We do not care about the return code.
157  m_advertising = false;
158  }
159  break;
160 
162  if(m_state_variables.current_state == PRU_SM_STATE_SYSTEM_ERROR && pru_sensors_data_get()->vrect >= PRU_VRECT_UVLO && !m_advertising)
164  break;
165 
166  default:
167  break;
168  }
169 }
static bool m_adv_allowed
Definition: pru.c:43
#define PRU_SENSORS_TIMER_PERIOD_MS
Definition: pru_hw_config.h:39
static uint32_t m_vrect_high_duration_ms
Definition: pru.c:41
#define PRU_CHARGE_COMPLETE_ADV_WAIT_TIME_MS
Definition: pru_config.h:33
const pru_sensor_data_t * pru_sensors_data_get(void)
Get the latest data from the PRU sensors.
Definition: pru_sensors.c:146
pru_sm_state_t current_state
Definition: pru_sm.h:58
uint32_t pru_tmux_vout_enable_set(bool enable)
Test wrapper for pru_hal_vout_enable_set().
Definition: pru_test_mux.c:107
static bool m_advertising
Definition: pru.c:45
uint8_t charge_complete
Definition: pru_sensors.h:39
static void m_advertising_start(void)
Start advertising.
Definition: pru.c:57
#define PRU_VRECT_UVLO
Definition: pru_hw_config.h:24
static pru_sm_state_vars_t m_state_variables
Definition: pru.c:42
static void m_on_sm_event ( pru_sm_signal_type_t  evt)
static

Forward events to the PRU state machine. Also handles the resulting request event.

Parameters
[in]evtPRU state machine event.

Definition at line 175 of file pru.c.

176 {
177  uint32_t err_code;
178 
179  m_handle_event(evt);
180 
181  (void)pru_sm_execute(evt, &m_state_variables);
182 
184  {
186  {
187  case PRU_SM_STATE_COUNT:
188  break;
189 
190  case PRU_SM_STATE_NULL:
191  if (m_advertising)
192  {
193  (void) sd_ble_gap_adv_stop(); // We do not care about the return code.
194  m_advertising = false;
195  }
196  err_code = sd_ble_gap_disconnect(m_wpts.conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
197 
198  if(err_code != NRF_ERROR_INVALID_STATE && err_code != BLE_ERROR_INVALID_CONN_HANDLE && err_code != BLE_ERROR_NOT_ENABLED)
199  APP_ERROR_CHECK(err_code);
200 
201  err_code = pru_tmux_vout_enable_set(false);
202  APP_ERROR_CHECK(err_code);
203  break;
204 
205  case PRU_SM_STATE_BOOT:
206  err_code = pru_tmux_vout_enable_set(false);
207  APP_ERROR_CHECK(err_code);
208 
210  break;
211 
212  case PRU_SM_STATE_PRU_ON:
213  err_code = pru_tmux_vout_enable_set(true);
214  APP_ERROR_CHECK(err_code);
215  break;
216 
217  case PRU_SM_STATE_SYSTEM_ERROR:
218  err_code = pru_tmux_vout_enable_set(false);
219  APP_ERROR_CHECK(err_code);
220  break;
221  }
222  }
223 
224  // Notify application of state machine signal
225  // To avoid application from setting softdevice in illegal state before we need it,
226  // invoke at the end of the handling.
227  if(m_app_sm_evt_handler != NULL)
229 
230 }
uint16_t conn_handle
Definition: ble_wpts.h:80
static uint32_t m_vrect_high_duration_ms
Definition: pru.c:41
pru_sm_state_t prev_state
Definition: pru_sm.h:57
pru_sm_state_t current_state
Definition: pru_sm.h:58
uint32_t pru_tmux_vout_enable_set(bool enable)
Test wrapper for pru_hal_vout_enable_set().
Definition: pru_test_mux.c:107
static bool m_advertising
Definition: pru.c:45
pru_sm_state_t pru_sm_execute(pru_sm_signal_type_t sig, pru_sm_state_vars_t *p_state)
Execute state machine.
Definition: pru_sm.c:71
static pru_sm_state_vars_t m_state_variables
Definition: pru.c:42
static ble_wpts_t m_wpts
Definition: pru.c:38
static void m_handle_event(pru_sm_signal_type_t evt)
Handle PRU SM events that require profile handling.
Definition: pru.c:132
static app_sm_evt_handler_t m_app_sm_evt_handler
Definition: pru.c:44
static void m_wpts_evt_handler ( ble_wpts_t p_wpts,
ble_wpts_evt_t p_evt 
)
static

WPT Service event handler.

This function handles events from the WPT Service.

Parameters
[in]p_wptsWPT Service context.
[in]p_evtEvent.

Definition at line 239 of file pru.c.

240 {
241  uint32_t err_code;
242 
243  switch(p_evt->evt_type)
244  {
246  // Handle PRU Control Command
248  {
250  APP_ERROR_CHECK(err_code);
251  }
253  break;
254 
255  default:
256  break;
257  }
258 
259 #ifdef DEBUG_OUT_ENABLE
260  wpts_test_evt_handle_cb(p_wpts, p_evt);
261 #endif //DEBUG_OUT_ENABLE
262 }
uint8_t enable_pru_output
Definition: wpt.h:81
#define PRU_CCP_ADJUST_POWER_CAPABILITY
Definition: pru_hw_config.h:42
void wpts_test_evt_handle_cb(ble_wpts_t *p_wpts, ble_wpts_evt_t *p_evt)
Override weak wpts_test_evt_handle_cb()
Definition: pru_debug.c:77
static void m_on_sm_event(pru_sm_signal_type_t evt)
Forward events to the PRU state machine. Also handles the resulting request event.
Definition: pru.c:175
ble_wpts_evt_type_t evt_type
Definition: ble_wpts.h:43
union ble_wpts_evt_t::@0 data
pru_control_t pru_control
Definition: ble_wpts.h:46
ctl_adj_power_t adj_power
Definition: wpt.h:83
uint32_t pru_tmux_adj_power_set(ctl_adj_power_t adj_setting)
Test wrapper for pru_hal_adj_power_set().
Definition: pru_test_mux.c:112
static void on_ble_evt ( ble_evt_t *  p_ble_evt)
static

BLE stack GAP event handler.

This function handles BLE GAP events.

Parameters
[in]p_ble_evtBluetooth stack event.

Definition at line 271 of file pru.c.

272 {
273  uint32_t err_code = NRF_SUCCESS;
274 
275  switch (p_ble_evt->header.evt_id)
276  {
277  case BLE_GAP_EVT_TIMEOUT:
278  if (p_ble_evt->evt.gap_evt.params.timeout.src == BLE_GAP_TIMEOUT_SRC_ADVERTISING)
280  break;
281 
282  case BLE_GATTS_EVT_SYS_ATTR_MISSING:
283  err_code = sd_ble_gatts_sys_attr_set(m_conn_handle, NULL, 0, 0);
284  APP_ERROR_CHECK(err_code);
285  break;
286 
287  case BLE_GAP_EVT_CONNECTED:
288  m_wpts.reboot_bit = 1;
289  m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
290  break;
291 
292  case BLE_GAP_EVT_DISCONNECTED:
293  m_conn_handle = BLE_CONN_HANDLE_INVALID;
294  m_advertising = false;
295  m_on_sm_event(PRU_SM_SIGNAL_DISCONNECTED); // Treat disconnect in same way as power removed.
296  break;
297 
298  case BLE_GAP_EVT_SEC_PARAMS_REQUEST:
299  {
300  ble_gap_sec_params_t sec_params;
301 
302  memset(&sec_params, 0, sizeof(ble_gap_sec_params_t));
303  sec_params.bond = 0; // No bonding
304  sec_params.io_caps = BLE_GAP_IO_CAPS_NONE; // No IO capabilities
305  sec_params.min_key_size = PRU_SEC_MIN_KEYSIZE; // Min allowed key size
306  sec_params.max_key_size = PRU_SEC_MAX_KEYSIZE; // Max allowed key size
307  sec_params.mitm = 0; // No man in the middle protection
308  sec_params.oob = 0; // No out of band data available
309 
310  err_code = sd_ble_gap_sec_params_reply(p_ble_evt->evt.gap_evt.conn_handle, BLE_GAP_SEC_STATUS_SUCCESS, &sec_params, NULL);
311  }
312  break;
313 
314  case BLE_GAP_EVT_AUTH_STATUS:
315  ASSERT(p_ble_evt->evt.gap_evt.params.auth_status.auth_status == BLE_GAP_SEC_STATUS_SUCCESS);
316  break;
317 
318  default:
319  break;
320  }
321 
322  APP_ERROR_CHECK(err_code);
323 }
#define PRU_SEC_MIN_KEYSIZE
Definition: pru_config.h:37
#define PRU_SEC_MAX_KEYSIZE
Definition: pru_config.h:38
static void m_on_sm_event(pru_sm_signal_type_t evt)
Forward events to the PRU state machine. Also handles the resulting request event.
Definition: pru.c:175
static bool m_advertising
Definition: pru.c:45
uint8_t reboot_bit
Definition: ble_wpts.h:81
static void m_advertising_start(void)
Start advertising.
Definition: pru.c:57
static ble_wpts_t m_wpts
Definition: pru.c:38
static uint16_t m_conn_handle
Definition: pru.c:37
static uint32_t m_ble_wpts_pru_dynamic_set ( ble_wpts_t p_wpts,
const pru_sensor_data_t p_pru_sensor_data 
)
static

Set PRU dynamic data.

Updates the characteristic attributes with p_pru_sensor_data.

Parameters
[in]p_wptsWPT Service context.
[in]p_pru_sensor_dataPRU sensor data
Returns
NRF_SUCCESS/ERROR status code

Definition at line 375 of file pru.c.

376 {
377  pru_dynamic_t pru_dynamic;
378 
379  memset(&pru_dynamic,0,sizeof(pru_dynamic_t));
380 
387 
388  pru_dynamic.vrect = p_pru_sensor_data ->vrect;
389  pru_dynamic.irect = p_pru_sensor_data ->irect;
390  pru_dynamic.vout = p_pru_sensor_data ->vout;
391  pru_dynamic.iout = p_pru_sensor_data ->iout;
392  pru_dynamic.temperature = p_pru_sensor_data ->temperature;
393  pru_dynamic.vrect_min_dyn = PRU_VRECT_MIN;
394  pru_dynamic.vrect_set_dyn = PRU_VRECT_SET;
395  pru_dynamic.vrect_high_dyn = PRU_VRECT_HIGH;
396  pru_dynamic.alerts.pru_over_voltage = p_pru_sensor_data ->over_voltage;
397  pru_dynamic.alerts.pru_over_current = p_pru_sensor_data ->over_current;
398  pru_dynamic.alerts.pru_over_temperature = p_pru_sensor_data ->over_temperature;
399  pru_dynamic.alerts.charge_complete = p_pru_sensor_data ->charge_complete;
400  pru_dynamic.alerts.wired_charge_detect = p_pru_sensor_data ->wired_charge_detect;
401  pru_dynamic.alerts.pru_self_protection = 0;
402  pru_dynamic.adjust_power_response = p_pru_sensor_data -> power_adjusted;
403  pru_dynamic.pru_charge_port = p_pru_sensor_data->charge_port;
405 
406  return ble_wpts_pru_dynamic_set(p_wpts, &pru_dynamic);
407 }
uint16_t irect
Definition: wpt.h:168
uint8_t charge_port
Definition: pru_sensors.h:38
pru_alert_bits_t alerts
Definition: wpt.h:175
uint8_t wired_charge_detect
Definition: wpt.h:139
#define PRU_VRECT_MIN
Definition: pru_hw_config.h:25
uint16_t vout
Definition: wpt.h:169
uint8_t over_voltage
Definition: pru_sensors.h:33
uint8_t adjust_power_response
Definition: wpt.h:177
int16_t temperature
Definition: pru_sensors.h:32
#define PRU_VRECT_HIGH
Definition: pru_hw_config.h:27
#define BLE_WPTS_PRU_DYNAMIC_OPTION_VRECT_MIN_DYN_BITPOS
uint16_t vrect
Definition: wpt.h:167
uint16_t vrect_set_dyn
Definition: wpt.h:173
#define BLE_WPTS_PRU_DYNAMIC_OPTION_IOUT_BITPOS
int16_t temperature
Definition: wpt.h:171
uint16_t iout
Definition: wpt.h:170
uint16_t vrect_high_dyn
Definition: wpt.h:174
#define BLE_WPTS_PRU_DYNAMIC_OPTION_VRECT_SET_DYN_BITPOS
uint8_t over_temperature
Definition: pru_sensors.h:35
uint32_t ble_wpts_pru_dynamic_set(ble_wpts_t *p_wpts, pru_dynamic_t *p_pru_dynamic)
Sets value of the PRU Dynamic Parameter characteristic.
Definition: ble_wpts.c:790
ptu_tester_command_t tester_command
Definition: wpt.h:180
uint16_t vrect_min_dyn
Definition: wpt.h:172
#define BLE_WPTS_PRU_DYNAMIC_OPTION_VOUT_BITPOS
PRU Dynamic Parameter characteristic Option field.
uint8_t pru_charge_port
Definition: wpt.h:176
#define PRU_VRECT_SET
Definition: pru_hw_config.h:26
uint8_t pru_over_voltage
Definition: wpt.h:134
uint8_t charge_complete
Definition: pru_sensors.h:39
#define BLE_WPTS_PRU_DYNAMIC_OPTION_VRECT_HIGH_DYN_BITPOS
uint8_t pru_over_current
Definition: wpt.h:135
uint8_t pru_over_temperature
Definition: wpt.h:136
uint8_t wired_charge_detect
Definition: pru_sensors.h:37
uint8_t optional_fields
Definition: wpt.h:166
#define BLE_WPTS_PRU_DYNAMIC_OPTION_TEMPERATURE_BITPOS
uint8_t over_current
Definition: pru_sensors.h:34
uint8_t pru_self_protection
Definition: wpt.h:137
uint8_t charge_complete
Definition: wpt.h:138
PRU Dynamic Parameter structure.
Definition: wpt.h:164
static void m_sensors_timer_handler ( void *  p_context)
static

Sensors measurement timer timeout handler.

This function will be called each time the sensors measurement timer expires.

Parameters
[in]p_contextPointer used for passing some arbitrary information (context) from the app_start_timer() call to the timeout handler.

Definition at line 417 of file pru.c.

418 {
419  uint32_t err_code;
420  pru_alert_t alerts;
421  bool new_alert_occured = false;
422 
423  UNUSED_PARAMETER(p_context);
425 
427  APP_ERROR_CHECK(err_code);
428  err_code = pru_sensor_alerts_get(&new_alert_occured, &alerts);
429  APP_ERROR_CHECK(err_code);
430  if(new_alert_occured)
431  {
432  err_code = ble_wpts_alert_send(&m_wpts, &alerts);
433  // If not disconnected or CCCD not yet received.
434  if((err_code != BLE_ERROR_INVALID_CONN_HANDLE) && (err_code != NRF_ERROR_INVALID_STATE) && (err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING))
435  {
436  APP_ERROR_CHECK(err_code);
437  }
438  }
440 }
static uint32_t m_ble_wpts_pru_dynamic_set(ble_wpts_t *p_wpts, const pru_sensor_data_t *p_pru_sensor_data)
Set PRU dynamic data.
Definition: pru.c:375
void pru_sensors_gen_evts(void)
Generate PRU state machine events from sensor data.
Definition: pru_sensors.c:190
void pru_sensors_read_all(void)
Read PRU sensors.
Definition: pru_sensors.c:51
PRU Alert Parameter structure.
Definition: wpt.h:145
const pru_sensor_data_t * pru_sensors_data_get(void)
Get the latest data from the PRU sensors.
Definition: pru_sensors.c:146
uint32_t ble_wpts_alert_send(ble_wpts_t *p_wpts, pru_alert_t *p_alert)
Sends PRU alert if notification has been enabled.
Definition: ble_wpts.c:703
static ble_wpts_t m_wpts
Definition: pru.c:38
uint32_t pru_sensor_alerts_get(bool *new_alert_occured, pru_alert_t *p_pru_alert)
Extract alerts from the latest data read from PRU sensors.
Definition: pru_sensors.c:151

Variable Documentation

uint16_t m_conn_handle = BLE_CONN_HANDLE_INVALID
static

Handle of the current connection.

Definition at line 37 of file pru.c.

ble_wpts_t m_wpts
static

Structure used to identify the PRU service.

Definition at line 38 of file pru.c.

uint32_t m_vrect_high_duration_ms
static

For how long has VRECT been above limit.

Definition at line 41 of file pru.c.

pru_sm_state_vars_t m_state_variables
static

Previous, current and next state.

Definition at line 42 of file pru.c.

bool m_adv_allowed = false
static

Is advertising allowed.

Definition at line 43 of file pru.c.

app_sm_evt_handler_t m_app_sm_evt_handler = NULL
static

Optional application state machine event handler.

Definition at line 44 of file pru.c.

bool m_advertising
static

True when advertising

Definition at line 45 of file pru.c.