Nordic Semiconductor nRF5 AirFuel SDK  version 2.2.0
wpt.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include "ble_gap.h"
#include "ble_wpts_common.h"

Go to the source code of this file.

Data Structures

struct  pru_control_t
 PRU Control structure. More...
 
struct  pru_static_t
 PRU Static Parameter structure. More...
 
struct  ptu_static_t
 PTU Static Parameter structure. More...
 
struct  pru_alert_bits_t
 Alert field used in both Alert Characteristic and Dynamic Parameters Characteristic. More...
 
struct  pru_alert_t
 PRU Alert Parameter structure. More...
 
struct  pru_dynamic_t
 PRU Dynamic Parameter structure. More...
 

Macros

#define SDK_VERSION   "2.1.0"
 
#define TIMER_START(timer_id, ms, p_ctx)   app_timer_start( timer_id, APP_TIMER_TICKS(ms, APP_TIMER_PRESCALER), p_ctx);
 

Enumerations

WPT Service characteristics structs.
enum  ctl_adj_power_t { CTL_ADJ_POWER_MAX_VAL = BLE_WPTS_ENABLE_PRU_ADJ_POWER_MAX_VAL, CTL_ADJ_POWER_66_PCT_VAL = BLE_WPTS_ENABLE_PRU_ADJ_POWER_66_PCT_VAL, CTL_ADJ_POWER_33_PCT_VAL = BLE_WPTS_ENABLE_PRU_ADJ_POWER_33_PCT_VAL, CTL_ADJ_POWER_2_5_W_VAL = BLE_WPTS_ENABLE_PRU_ADJ_POWER_2_5_W_VAL }
 Power adjust settings in control packet. More...
 
enum  ctl_perm_t {
  CTL_PERMISSION_PERMITTED = BLE_WPTS_PERMISSION_PERMITTED, CTL_PERMISSION_PERMITTED_WAITING = BLE_WPTS_PERMISSION_PERMITTED_WAITING, CTL_PERMISSION_DENIED_CROSS_CONNECTION = BLE_WPTS_PERMISSION_DENIED_CC, CTL_PERMISSION_DENIED_POWER = BLE_WPTS_PERMISSION_DENIED_POWER,
  CTL_PERMISSION_DENIED_DEVICES = BLE_WPTS_PERMISSION_DENIED_DEVICES, CTL_PERMISSION_DENIED_CLASS = BLE_WPTS_PERMISSION_DENIED_CLASS, CTL_PERMISSION_DENIED_HIGH_TEMP = BLE_WPTS_PERMISSION_DENIED_HIGH_TEMP
}
 Permissions fields in control packet. More...
 
enum  ctl_time_set_t {
  CTL_TIME_SET_DENIED = BLE_WPTS_TIME_SET_DENIED, CTL_TIME_SET_10MS = BLE_WPTS_TIME_SET_10MS, CTL_TIME_SET_20MS = BLE_WPTS_TIME_SET_20MS, CTL_TIME_SET_30MS = BLE_WPTS_TIME_SET_30MS,
  CTL_TIME_SET_40MS = BLE_WPTS_TIME_SET_40MS, CTL_TIME_SET_50MS = BLE_WPTS_TIME_SET_50MS, CTL_TIME_SET_60MS = BLE_WPTS_TIME_SET_60MS, CTL_TIME_SET_70MS = BLE_WPTS_TIME_SET_70MS,
  CTL_TIME_SET_80MS = BLE_WPTS_TIME_SET_80MS
}
 Time set field in control packet. More...
 
enum  pru_alert_type_t { ALERT_TYPE_NOTIFICATION = 0, ALERT_TYPE_INDICATION = 1 }
 Definition of PRU alert type. More...
 
enum  ptu_tester_command_t { WPTS_PTU_TEST_CMD_NORMAL_OPERATION_POWER_CTL = 0, WPTS_PTU_TEST_CMD_INCREASE_ITX = 1, WPTS_PTU_TEST_CMD_DECREASE_ITX = 2, WPTS_PTU_TEST_CMD_NO_ADJ_ITX = 3 }
 PTU Tester commands. More...
 

Common functions and macros.

#define APP_ERROR_CHECK_ALLOW_DISCONNECT(ERR_CODE)
 Macro equivalent to APP_ERROR_CHECK, except that error codes returned if connection is lost will be allowed. More...
 
void power_manage (void)
 Power manager.
 
void system_off (void)
 Function to put system in SYSTEMOFF mode.
 
uint32_t ticks_diff (uint32_t ticks_now, uint32_t ticks_old)
 
void dfu_start (void)
 Starts DFU mode. The function writes a special value to retention register to tell bootloader to start DFU mode, disables SoftDevice and performs a reset.
 
bool dfu_check (void)
 Needs to be implemented by application. Check if it is OK to jump to the DFU application. More...
 
void terminate (void)
 Needs to be implemented by application. Perform all requried actions before jump to DFU application can be done.