#include <stdint.h>
#include <string.h>
#include "ptu.h"
#include "nrf_assert.h"
#include "ptu_test_mux.h"
#include "ptu_sensors.h"
#include "ptu_conn_man.h"
#include "ptu_power_ctl.h"
#include "ptu_power_sharing.h"
#include "ptu_beacons.h"
#include "ptu_latching_fault.h"
#include "ptu_distant_list_handler.h"
Go to the source code of this file.
|
|
void | ptu_on_ble_evt (ble_evt_t *p_ble_evt) |
| Dispatches a BLE stack event to PTU. More...
|
|
void | ptu_init (app_sm_evt_handler_t sm_evt_handler) |
| Initialize PTU. This function must be called before any other PTU function can be called. More...
|
|
void | ptu_start (void) |
| Start ptu profile. Here "start" means that profile can start generating events through ptu_evt_handler().
|
|
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...
|
|
APP_TIMER_DEF |
( |
m_pru_dyn_read_timer_id |
| ) |
|
PRU dynamic parameter read timer ID.
APP_TIMER_DEF |
( |
m_ptu_sensor_timer_id |
| ) |
|
static void m_ptu_pru_dyn_read_timer_handler |
( |
void * |
p_context | ) |
|
|
static |
PRU dynamic read timer handler. ¨*
- Parameters
-
Definition at line 114 of file ptu.c.
123 #if(PTU_CCA_ROGUE_DETECT_ENABLE == true)
126 APP_ERROR_CHECK(err_code);
void ptu_power_ctrl_adjust(void)
Perform power control adjustments.
uint8_t ptu_reg_n_entries_get(void)
Get the number of devices currently in registry. This will include all connected devices, as well as all devices which is currently being registered.
void ptu_cm_dynamic_read_all(void)
Issue read request for the PRU dynamic characteristic to all registerred PRUs.
uint32_t ptu_sensors_data_get(const ptu_sensor_data_t **sensors_data)
Get the latest data read from the PTU sensors.
static void m_ptu_sm_execute(ptu_sm_signal_type_t signal)
Used when executing state machine events.
bool ptu_cm_mode_trans_in_progress(void)
Get mode transition status.
Definition of PTU sensor data.
static void m_ptu_sensor_timer_handler |
( |
void * |
p_context | ) |
|
|
static |
Handler of sensor timer.
- Parameters
-
[in] | p_context | Generic context to sent to handler. |
Definition at line 146 of file ptu.c.
152 APP_ERROR_CHECK(err_code);
154 APP_ERROR_CHECK(err_code);
uint32_t ptu_sensors_read(void)
Read sensors. This function should typically be called regularly by a timer and can generate events b...
void ptu_power_sharing_temperature_warning_set(bool warning)
Inform power control module that PTU is having a high temperature warning. When this occurs the power...
uint32_t ptu_sensors_data_get(const ptu_sensor_data_t **sensors_data)
Get the latest data read from the PTU sensors.
Definition of PTU sensor data.
State variables.
Definition at line 36 of file ptu.c.
Application state machine event handler.
Definition at line 37 of file ptu.c.