Application main function.
221 APP_ERROR_CHECK(err_code);
237 APP_ERROR_CHECK(err_code);
241 err_code = sd_ble_gap_address_set(BLE_GAP_ADDR_CYCLE_MODE_NONE, &
PRU_ADDR);
242 APP_ERROR_CHECK(err_code);
248 err_code = sd_ble_gap_address_set(BLE_GAP_ADDR_CYCLE_MODE_NONE, &
APP_PROFILE_ADDR);
249 APP_ERROR_CHECK(err_code);
256 #ifdef DEBUG_OUT_ENABLE
static void m_ble_stack_init(void)
BLE stack initialization.
static bool m_profile_has_been_switched
void app_profile_start(void)
Start profile. Is called every time profile is activated.
void pru_init(app_sm_evt_handler_t sm_evt_handler)
Initialize PRU. This function must be called before any other PRU function can be called...
void pru_sensors_init(pru_sm_handler_t pru_sm_handler)
Initialize sensors and read default values.
device_profile_t m_current_profile
static nrf_clock_lf_cfg_t clk_cfg
static void m_timers_init(void)
Init timers required by this module.
#define VRECT_MEAS_INTERVAL
void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)
Callback function for asserts in the SoftDevice.
static const ble_gap_addr_t PRU_ADDR
#define APP_TIMER_PRESCALER
#define PRU_BUTTON_PRESS_LENGTH_DFU_MS
static ble_enable_params_t m_ble_enable_params
BLE Enable params.
void debug(void)
Process debug commands.
void pru_start(void)
Enable the PRU profile. When enabled sensor reading and signal generation will be enabled...
static const ble_gap_addr_t APP_PROFILE_ADDR
void app_profile_init(void)
Initialize profile. Is only called once.
static void m_on_pru_sm_evt(pru_sm_signal_type_t signal, const pru_sm_state_vars_t *p_state_vars)
PRU state machine event handler. Used to see when charging has stopped.