Nordic Semiconductor nRF5 AirFuel SDK
version 2.2.0
|
#include <stdint.h>
#include "debug.h"
#include "softdevice_handler.h"
#include "app_profile.h"
#include "pru_sensors.h"
#include "pru_hw_config.h"
#include "pru_config.h"
#include "nrf_assert.h"
#include "app_print.h"
#include "app_util_platform.h"
#include "nrf_nvic.h"
#include "common_hal_buttons.h"
Go to the source code of this file.
Macros | |
#define | DEAD_BEEF 0xDEADBEEF |
#define | VRECT_MEAS_INTERVAL APP_TIMER_TICKS(50, APP_TIMER_PRESCALER) |
#define | VRECT_MEAS_INTERVAL APP_TIMER_TICKS(50, APP_TIMER_PRESCALER) |
#define | PRU_MULTI_PROFILE_TIMER_OP_QUEUE_SIZE (8 + PRU_MAX_APP_TIMERS) |
Enumerations | |
enum | device_profile_t { PROFILE_WPT, PROFILE_APPLICATION } |
Enum representing the current active profile. | |
Functions | |
APP_TIMER_DEF (m_vrect_read_timer) | |
static void | m_ble_evt_dispatch (ble_evt_t *p_ble_evt) |
Dispatches a BLE stack event to all profiles. More... | |
static void | m_sys_evt_dispatch (uint32_t evt) |
Dispatch system events to all profiles that require it. | |
static void | m_ble_stack_init (void) |
BLE stack initialization. More... | |
static void | vrect_read_timeout_handler (void *p_context) |
Handler for reading VRECT. | |
static void | m_timers_init (void) |
Init timers required by this module. | |
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. | |
int | main () |
Application main function. More... | |
Variables | |
static nrf_clock_lf_cfg_t | clk_cfg |
static bool | m_connected = false |
static bool | m_profile_has_been_switched = false |
static const ble_gap_addr_t | PRU_ADDR |
static const ble_gap_addr_t | APP_PROFILE_ADDR |
static ble_enable_params_t | m_ble_enable_params |
BLE Enable params. More... | |
device_profile_t | m_current_profile = PROFILE_APPLICATION |