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

Go to the source code of this file.

Data Structures

struct  ble_wpts_service_data_t
 Struct holding contents of "Service data AD type". More...
 

Macros

#define BLE_WPTS_SEC_MODE_1_LEVEL_1   BLE_GAP_CONN_SEC_MODE_SET_OPEN
 
#define BLE_WPTS_SEC_MODE_1_LEVEL_2   BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM
 
#define BLE_WPTS_ADV_UUID_POS   0
 Advertising data. More...
 
#define BLE_WPTS_ADV_UUID_LEN   2
 
#define BLE_WPTS_ADV_SERVICE_HANDLE_POS   0
 Advertising Service Data. More...
 
#define BLE_WPTS_ADV_SERVICE_HANDLE_LEN   2
 
#define BLE_WPTS_ADV_PRU_RSSI_PARAMS_POS   (BLE_WPTS_ADV_SERVICE_HANDLE_POS + BLE_WPTS_ADV_SERVICE_HANDLE_LEN)
 
#define BLE_WPTS_ADV_PRU_RSSI_PARAMS_LEN   1
 
#define BLE_WPTS_ADV_ANTENNA_GAIN_OFFSET   5
 
#define BLE_WPTS_ADV_ANTENNA_GAIN_UNKNOWN_VAL   0xFF
 
#define BLE_WPTS_ADV_PRU_TX_POWER_LEVEL_OFFSET   20
 
#define BLE_WPTS_ADV_POWER_UNKNOWN_VAL   0xFF
 
#define BLE_WPTS_ADV_PRU_RSSI_PRU_GAIN_BITPOS   0
 
#define BLE_WPTS_ADV_PRU_RSSI_PRU_GAIN_BITMSK   0x07
 
#define BLE_WPTS_ADV_PRU_RSSI_PRU_PWR_BITPOS   3
 
#define BLE_WPTS_ADV_PRU_RSSI_PRU_PWR_BITMSK   (0x1F << BLE_WPTS_ADV_PRU_RSSI_PRU_PWR_BITPOS)
 
#define BLE_WPTS_ADV_FLAGS_POS   (BLE_WPTS_ADV_PRU_RSSI_PARAMS_POS + BLE_WPTS_ADV_PRU_RSSI_PARAMS_LEN)
 
#define BLE_WPTS_ADV_FLAGS_LEN   1
 
#define BLE_WPTS_ADV_SERVICE_DATA_LENGTH   (BLE_WPTS_ADV_UUID_LEN + BLE_WPTS_ADV_SERVICE_HANDLE_LEN + BLE_WPTS_ADV_PRU_RSSI_PARAMS_LEN + BLE_WPTS_ADV_FLAGS_LEN)
 
#define BLE_WPTS_ADV_FLAG_IMPEDANCE_SHIFT_BITPOS   5
 
#define BLE_WPTS_ADV_FLAG_IMPEDANCE_SHIFT_BITMSK   (0x07 << BLE_WPTS_ADV_FLAG_IMPEDANCE_SHIFT_BITPOS)
 
#define BLE_WPTS_ADV_FLAG_REBOOT_INDICATOR_BITPOS   4
 
#define BLE_WPTS_ADV_FLAG_REBOOT_INDICATOR_BITMSK   (1 << BLE_WPTS_ADV_FLAG_REBOOT_INDICATOR_BITPOS)
 
#define BLE_WPTS_ADV_FLAG_OVP_STATUS_BITPOS   3
 
#define BLE_WPTS_ADV_FLAG_OVP_STATUS_BITMSK   (1 << BLE_WPTS_ADV_FLAG_OVP_STATUS_BITPOS)
 
#define BLE_WPTS_ADV_FLAG_TIME_SET_SUPPORT_BITPOS   2
 
#define BLE_WPTS_ADV_FLAG_TIME_SET_SUPPORT_BITMSK   (1 << BLE_WPTS_ADV_FLAG_TIME_SET_SUPPORT_BITPOS)
 
#define BLE_WPTS_ADV_FLAG_REBOOT_INDICATOR_REBOOTED_VAL   0
 
#define BLE_WPTS_ADV_FLAG_REBOOT_INDICATOR_NOT_REBOOTED_VAL   1
 
#define BLE_WPTS_ADV_SERVICE_DATA_LEN   (BLE_WPTS_ADV_FLAGS_POS + BLE_WPTS_ADV_FLAGS_LEN)
 
#define BLE_WPTS_PRU_CONTROL_ENABLES_POS   0
 PRU Control characteristic fields byte positions. More...
 
#define BLE_WPTS_PRU_CONTROL_PERMISSION_POS   1
 
#define BLE_WPTS_PRU_CONTROL_TIME_SET_POS   2
 
#define BLE_WPTS_ENABLE_PRU_OUTPUT_BITPOS   7
 PRU Control characteristic Enables bit field definitions. More...
 
#define BLE_WPTS_ENABLE_PRU_OUTPUT_BITMSK   (0x01 << BLE_WPTS_ENABLE_PRU_OUTPUT_BITPOS)
 
#define BLE_WPTS_ENABLE_PRU_OUTPUT_ENABLE_VAL   0x01
 
#define BLE_WPTS_ENABLE_PRU_OUTPUT_DISABLE_VAL   0x00
 
#define BLE_WPTS_ENABLE_PRU_CHARGE_INDICATOR_BITPOS   6
 
#define BLE_WPTS_ENABLE_PRU_CHARGE_INDICATOR_BITMSK   (0x01 << BLE_WPTS_ENABLE_PRU_CHARGE_INDICATOR_BITPOS)
 
#define BLE_WPTS_ENABLE_PRU_CHARGE_INDICATOR_ENABLE_VAL   0x01
 
#define BLE_WPTS_ENABLE_PRU_CHARGE_INDICATOR_DISABLE_VAL   0x00
 
#define BLE_WPTS_ENABLE_PRU_ADJ_POWER_BITPOS   4
 
#define BLE_WPTS_ENABLE_PRU_ADJ_POWER_BITMSK   (0x03 << BLE_WPTS_ENABLE_PRU_ADJ_POWER_BITPOS)
 
#define BLE_WPTS_ENABLE_PRU_ADJ_POWER_MAX_VAL   0x00
 
#define BLE_WPTS_ENABLE_PRU_ADJ_POWER_66_PCT_VAL   0x01
 
#define BLE_WPTS_ENABLE_PRU_ADJ_POWER_33_PCT_VAL   0x02
 
#define BLE_WPTS_ENABLE_PRU_ADJ_POWER_2_5_W_VAL   0x03
 
#define BLE_WPTS_PERMISSION_PERMITTED   0x00
 PRU Control characteristic Permission field values. More...
 
#define BLE_WPTS_PERMISSION_PERMITTED_WAITING   0x01
 
#define BLE_WPTS_PERMISSION_DENIED_CC   0x80
 
#define BLE_WPTS_PERMISSION_DENIED_POWER   0x81
 
#define BLE_WPTS_PERMISSION_DENIED_DEVICES   0x82
 
#define BLE_WPTS_PERMISSION_DENIED_CLASS   0x83
 
#define BLE_WPTS_PERMISSION_DENIED_HIGH_TEMP   0x84
 
#define BLE_WPTS_TIME_SET_DENIED   0x00
 PRU Control characteristic Time set values. More...
 
#define BLE_WPTS_TIME_SET_10MS   0x01
 
#define BLE_WPTS_TIME_SET_20MS   0x02
 
#define BLE_WPTS_TIME_SET_30MS   0x03
 
#define BLE_WPTS_TIME_SET_40MS   0x04
 
#define BLE_WPTS_TIME_SET_50MS   0x05
 
#define BLE_WPTS_TIME_SET_60MS   0x06
 
#define BLE_WPTS_TIME_SET_70MS   0x07
 
#define BLE_WPTS_TIME_SET_80MS   0x08
 
#define BLE_WPTS_PTU_STATIC_OPTIONAL_FIELDS_POS   0
 PTU Static Parameter characteristic byte positions. More...
 
#define BLE_WPTS_PTU_STATIC_PTU_POWER_POS   1
 
#define BLE_WPTS_PTU_STATIC_PTU_MAX_SRC_IMPED_POS   2
 
#define BLE_WPTS_PTU_STATIC_PTU_MAX_LOAD_RES_POS   3
 
#define BLE_WPTS_PTU_STATIC_PTU_CLASS_POS   6
 
#define BLE_WPTS_PTU_STATIC_HW_REV_POS   7
 
#define BLE_WPTS_PTU_STATIC_FW_REV_POS   8
 
#define BLE_WPTS_PTU_STATIC_PROTOCOL_REV_POS   9
 
#define BLE_WPTS_PTU_STATIC_NUM_DEVICES_SUPPORTED_POS   10
 
#define BLE_WPTS_OPTION_INVALID_VAL   0
 Common bitifeld valus. More...
 
#define BLE_WPTS_OPTION_VALID_VAL   1
 
#define BLE_WPTS_PTU_STATIC_OPTION_MAX_IMPEDANCE_BITPOS   0x07
 PTU Static characteristic Option bitfield definitions. More...
 
#define BLE_WPTS_PTU_STATIC_OPTION_MAX_IMPEDANCE_BITMSK   (0x01 << BLE_WPTS_PTU_STATIC_OPTION_MAX_IMPEDANCE_BITPOS)
 
#define BLE_WPTS_PTU_STATIC_OPTION_MAX_RESISTANCE_BITPOS   0x06
 
#define BLE_WPTS_PTU_STATIC_OPTION_MAX_RESISTANCE_BITMSK   (0x01 << BLE_WPTS_PTU_STATIC_OPTION_MAX_RESISTANCE_BITPOS)
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_BITPOS   3
 PTU Static characteristic PTU Max Source Impedance bitfield. More...
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_BITMSK   (0x1F << BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_BITPOS)
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_50_VAL   0
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_60_VAL   1
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_70_VAL   2
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_80_VAL   3
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_90_VAL   4
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_100_VAL   5
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_110_VAL   6
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_120_VAL   7
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_130_VAL   8
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_140_VAL   9
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_150_VAL   10
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_175_VAL   11
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_200_VAL   12
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_225_VAL   13
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_250_VAL   14
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_275_VAL   15
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_300_VAL   16
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_350_VAL   17
 
#define BLE_WPTS_PTU_STATIC_MAX_SOURCE_IMPEDANCE_375_VAL   18
 
#define BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_BITPOS   3
 PTU Static characteristic PTU Max Load Resistance bitfield. More...
 
#define BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_BITMSK   (0x1F << BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_BITPOS)
 
#define BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_5_VAL   0
 
#define BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_10_VAL   1
 
#define BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_15_VAL   2
 
#define BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_20_VAL   3
 
#define BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_25_VAL   4
 
#define BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_30_VAL   5
 
#define BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_35_VAL   6
 
#define BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_40_VAL   7
 
#define BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_45_VAL   8
 
#define BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_50_VAL   9
 
#define BLE_WPTS_PTU_STATIC_MAX_LOAD_RESISTANCE_55_VAL   10
 
#define BLE_WPTS_PTU_STATIC_NUM_DEVICES_BITPOS   0
 PTU Static characteristic PTU MAx Number of Devices Supported field. More...
 
#define BLE_WPTS_PTU_STATIC_NUM_DEVICES_BITMSK   (0x0F << BLE_WPTS_PTU_STATIC_NUM_DEVICES_BITPOS)
 
#define BLE_WPTS_PTU_STATIC_NUM_DEVICES_1_VAL   0
 
#define BLE_WPTS_PTU_STATIC_NUM_DEVICES_2_VAL   1
 
#define BLE_WPTS_PTU_STATIC_NUM_DEVICES_3_VAL   2
 
#define BLE_WPTS_PTU_STATIC_NUM_DEVICES_4_VAL   3
 
#define BLE_WPTS_PTU_STATIC_NUM_DEVICES_5_VAL   4
 
#define BLE_WPTS_PTU_STATIC_NUM_DEVICES_6_VAL   5
 
#define BLE_WPTS_PTU_STATIC_NUM_DEVICES_7_VAL   6
 
#define BLE_WPTS_PTU_STATIC_NUM_DEVICES_8_VAL   7
 
#define BLE_WPTS_PTU_CLASS_1   0
 PTU Static characteristic PTU Class field. More...
 
#define BLE_WPTS_PTU_CLASS_2   1
 
#define BLE_WPTS_PTU_CLASS_3   2
 
#define BLE_WPTS_PTU_CLASS_4   3
 
#define BLE_WPTS_PTU_CLASS_5   4
 
#define BLE_WPTS_PTU_CLASS_6   5
 
#define BLE_WPTS_PRU_STATIC_OPTIONAL_FIELDS_POS   0
 PRU Static Parameter characteristic byte positions. More...
 
#define BLE_WPTS_PRU_STATIC_PROTOCOL_REV_POS   1
 
#define BLE_WPTS_PRU_STATIC_PRU_CATEGORY_POS   3
 
#define BLE_WPTS_PRU_STATIC_PRU_INFORMATION_POS   4
 
#define BLE_WPTS_PRU_STATIC_HW_REV_POS   5
 
#define BLE_WPTS_PRU_STATIC_FW_REV_POS   6
 
#define BLE_WPTS_PRU_STATIC_PRECT_MAX_POS   7
 
#define BLE_WPTS_PRU_STATIC_VRECT_MIN_STATIC_POS   8
 
#define BLE_WPTS_PRU_STATIC_VRECT_HIGH_STATIC_POS   10
 
#define BLE_WPTS_PRU_STATIC_VRECT_SET_POS   12
 
#define BLE_WPTS_PRU_STATIC_DELTA_R1_POS   14
 
#define BLE_WPTS_PRU_STATIC_OPTION_DELTA_R1_BITPOS   0x07
 PRU Static characteristic Option field. More...
 
#define BLE_WPTS_PRU_STATIC_OPTION_DELTA_R1_BITMSK   (0x01 << BLE_WPTS_PRU_STATIC_OPTION_DELTA_R1_BITPOS)
 
#define BLE_WPTS_PRU_CATEGORY_NO_IMP_SHIFT   0
 PRU Static characteristic PRU Category field. More...
 
#define BLE_WPTS_PRU_CATEGORY_1   1
 
#define BLE_WPTS_PRU_CATEGORY_2   2
 
#define BLE_WPTS_PRU_CATEGORY_3   3
 
#define BLE_WPTS_PRU_CATEGORY_4   4
 
#define BLE_WPTS_PRU_CATEGORY_5   5
 
#define BLE_WPTS_PRU_CATEGORY_6   6
 
#define BLE_WPTS_PRU_CATEGORY_7   7
 
#define BLE_WPTS_PRU_INFO_NFC_BITPOS   0x07
 PRU Static characteristic PRU Information field. More...
 
#define BLE_WPTS_PRU_INFO_NFC_BITMSK   (0x01 << BLE_WPTS_PRU_INFO_NFC_BITPOS)
 
#define BLE_WPTS_PRU_INFO_NFC_SUPPORTED_VAL   1
 
#define BLE_WPTS_PRU_INFO_NFC_NOT_SUPPORTED_VAL   0
 
#define BLE_WPTS_PRU_INFO_BLE_BITPOS   0x06
 
#define BLE_WPTS_PRU_INFO_BLE_BITMSK   (0x01 << BLE_WPTS_PRU_INFO_BLE_BITPOS)
 
#define BLE_WPTS_PRU_INFO_BLE_SUPPORTED_VAL   0x01
 
#define BLE_WPTS_PRU_INFO_BLE_NOT_SUPPORTED_VAL   0x00
 
#define BLE_WPTS_PRU_INFO_POWER_CONTROL_PREF_BITPOS   0x05
 
#define BLE_WPTS_PRU_INFO_POWER_CONTROL_PREF_BITMSK   (0x01 << BLE_WPTS_PRU_INFO_POWER_CONTROL_PREF_BITPOS)
 
#define BLE_WPTS_PRU_INFO_POWER_CONTROL_PREF_VRECT_MIN_ERROR_VAL   0x00
 
#define BLE_WPTS_PRU_INFO_POWER_CONTROL_PREF_MAX_SYS_EFC_VAL   0x01
 
#define BLE_WPTS_PRU_INFO_ADJUST_POWER_BITPOS   0x04
 
#define BLE_WPTS_PRU_INFO_ADJUST_POWER_BITMSK   (0x01 << BLE_WPTS_PRU_INFO_ADJUST_POWER_BITPOS)
 
#define BLE_WPTS_PRU_INFO_ADJUST_POWER_SUPPORTED_VAL   0x01
 
#define BLE_WPTS_PRU_INFO_ADJUST_POWER_NOT_SUPPORTED_VAL   0x00
 
#define BLE_WPTS_PRU_INFO_CHARGE_COMPLETE_CONN_MODE_BITPOS   0x03
 
#define BLE_WPTS_PRU_INFO_CHARGE_COMPLETE_CONN_MODE_BITMSK   (0x01 << BLE_WPTS_PRU_INFO_CHARGE_COMPLETE_CONN_MODE_BITPOS)
 
#define BLE_WPTS_PRU_INFO_CHARGE_COMPLETE_CONN_MODE_SUPPORTED_VAL   0x01
 
#define BLE_WPTS_PRU_INFO_CHARGE_COMPLETE_CONN_MODE_NOT_SUPPORTED_VAL   0x00
 
#define BLE_WPTS_PRU_INFO_PTU_TEST_MODE_BITPOS   0x02
 
#define BLE_WPTS_PRU_INFO_PTU_TEST_MODE_BITMSK   (0x01 << BLE_WPTS_PRU_INFO_PTU_TEST_MODE_BITPOS)
 
#define BLE_WPTS_PRU_INFO_PTU_TEST_MODE_ENABLED_VAL   0x01
 
#define BLE_WPTS_PRU_INFO_PTU_TEST_MODE_DISABLED_VAL   0x00
 
#define BLE_WPTS_PRU_DYNAMIC_ALERT_CHARGE_PORT_BITPOS   0x01
 PRU dynamic characteristic Alert bitfield. Remaining bitifields is the same as PRU Alert characteristic bitfields. More...
 
#define BLE_WPTS_PRU_DYNAMIC_ALERT_CHARGE_PORT_BITMSK   (0x01 << BLE_WPTS_PRU_DYNAMIC_ALERT_CHARGE_PORT_BITPOS)
 
#define BLE_WPTS_PRU_DYNAMIC_ALERT_ADJ_POWER_RESP_BITPOS   0x00
 
#define BLE_WPTS_PRU_DYNAMIC_ALERT_ADJ_POWER_RESP_BITMSK   (0x01 << BLE_WPTS_PRU_DYNAMIC_ALERT_ADJ_POWER_RESP_BITPOS)
 
#define BLE_WPTS_PRU_DYNAMIC_OPTIONAL_FIELDS_POS   0
 PRU dynamic characteristic byte positions. More...
 
#define BLE_WPTS_PRU_DYNAMIC_VRECT_POS   1
 
#define BLE_WPTS_PRU_DYNAMIC_IRECT_POS   3
 
#define BLE_WPTS_PRU_DYNAMIC_VOUT_POS   5
 
#define BLE_WPTS_PRU_DYNAMIC_IOUT_POS   7
 
#define BLE_WPTS_PRU_DYNAMIC_TEMPERATURE_POS   9
 
#define BLE_WPTS_PRU_DYNAMIC_VRECT_MIN_DYN_POS   10
 
#define BLE_WPTS_PRU_DYNAMIC_VRECT_SET_DYN_POS   12
 
#define BLE_WPTS_PRU_DYNAMIC_VRECT_HIGH_DYN_POS   14
 
#define BLE_WPTS_PRU_DYNAMIC_PRU_ALERT_POS   16
 
#define BLE_WPTS_PRU_DYNAMIC_PTU_TESTER_COMMAND_POS   17
 
#define BLE_WPTS_PRU_DYNAMIC_OPTION_VOUT_BITPOS   7
 PRU Dynamic Parameter characteristic Option field. More...
 
#define BLE_WPTS_PRU_DYNAMIC_OPTION_IOUT_BITPOS   6
 
#define BLE_WPTS_PRU_DYNAMIC_OPTION_TEMPERATURE_BITPOS   5
 
#define BLE_WPTS_PRU_DYNAMIC_OPTION_VRECT_MIN_DYN_BITPOS   4
 
#define BLE_WPTS_PRU_DYNAMIC_OPTION_VRECT_SET_DYN_BITPOS   3
 
#define BLE_WPTS_PRU_DYNAMIC_OPTION_VRECT_HIGH_DYN_BITPOS   2
 
#define BLE_WPTS_PRU_DYNAMIC_OPTION_VOUT_BITMSK   (1 << BLE_WPTS_PRU_DYNAMIC_OPTION_VOUT_BITPOS)
 
#define BLE_WPTS_PRU_DYNAMIC_OPTION_IOUT_BITMSK   (1 << BLE_WPTS_PRU_DYNAMIC_OPTION_IOUT_BITPOS)
 
#define BLE_WPTS_PRU_DYNAMIC_OPTION_TEMPERATURE_BITMSK   (1 << BLE_WPTS_PRU_DYNAMIC_OPTION_TEMPERATURE_BITPOS)
 
#define BLE_WPTS_PRU_DYNAMIC_OPTION_VRECT_MIN_DYN_BITMSK   (1 << BLE_WPTS_PRU_DYNAMIC_OPTION_VRECT_MIN_DYN_BITPOS)
 
#define BLE_WPTS_PRU_DYNAMIC_OPTION_VRECT_SET_DYN_BITMSK   (1 << BLE_WPTS_PRU_DYNAMIC_OPTION_VRECT_SET_DYN_BITPOS)
 
#define BLE_WPTS_PRU_DYNAMIC_OPTION_VRECT_HIGH_DYN_BITMSK   (1 << BLE_WPTS_PRU_DYNAMIC_OPTION_VRECT_HIGH_DYN_BITPOS)
 
#define BLE_WPTS_PRU_ALERT_POS   0
 PRU alert characteristic byte positions. More...
 
#define BLE_WPTS_PRU_ADDRESS_POS   1
 
#define BLE_WPTS_PRU_ALERT_OVER_VOLTAGE_BITPOS   0x07
 PRU Alert characteristic value bitfield. More...
 
#define BLE_WPTS_PRU_ALERT_OVER_VOLTAGE_BITMSK   (0x01 << BLE_WPTS_PRU_ALERT_OVER_VOLTAGE_BITPOS)
 
#define BLE_WPTS_PRU_ALERT_OVER_CURRENT_BITPOS   0x06
 
#define BLE_WPTS_PRU_ALERT_OVER_CURRENT_BITMSK   (0x01 << BLE_WPTS_PRU_ALERT_OVER_CURRENT_BITPOS)
 
#define BLE_WPTS_PRU_ALERT_OVER_TEMPERATURE_BITPOS   0x05
 
#define BLE_WPTS_PRU_ALERT_OVER_TEMPERATURE_BITMSK   (0x01 << BLE_WPTS_PRU_ALERT_OVER_TEMPERATURE_BITPOS)
 
#define BLE_WPTS_PRU_ALERT_SELF_PROTECTION_BITPOS   0x04
 
#define BLE_WPTS_PRU_ALERT_SELF_PROTECTION_BITMSK   (0x01 << BLE_WPTS_PRU_ALERT_SELF_PROTECTION_BITPOS)
 
#define BLE_WPTS_PRU_ALERT_CHARGE_COMPLETE_BITPOS   0x03
 
#define BLE_WPTS_PRU_ALERT_CHARGE_COMPLETE_BITMSK   (0x01 << BLE_WPTS_PRU_ALERT_CHARGE_COMPLETE_BITPOS)
 
#define BLE_WPTS_PRU_ALERT_WIRED_CHARGER_DETECT_BITPOS   0x02
 
#define BLE_WPTS_PRU_ALERT_WIRED_CHARGER_DETECT_BITMSK   (0x01 << BLE_WPTS_PRU_ALERT_WIRED_CHARGER_DETECT_BITPOS)
 
#define BLE_WPTS_PRU_ALERT_MODE_TRANSITION_BITPOS   0x00
 
#define BLE_WPTS_PRU_ALERT_MODE_TRANSITION_BITMSK   (0x03 << BLE_WPTS_PRU_ALERT_MODE_TRANSITION_BITPOS)
 
#define BLE_WPTS_PRU_ALERT_NO_SELF_PROTECTION_VAL   0x00
 
#define BLE_WPTS_PRU_ALERT_MODE_NO_MODE_TRANSITION_VAL   0x00
 PRU Alert Mode transition. More...
 
#define BLE_WPTS_PRU_ALERT_MODE_2S_MODE_TRANSITION_VAL   0x01
 
#define BLE_WPTS_PRU_ALERT_MODE_3S_MODE_TRANSITION_VAL   0x02
 
#define BLE_WPTS_PRU_ALERT_MODE_6S_MODE_TRANSITION_VAL   0x03
 
#define BLE_WPTS_UUID16   0xFFFE
 WPT Service UUIDs. More...
 
#define BLE_WPTS_UUID16_LEN   2
 
#define BLE_WPTS_UUID128_CHAR_BASE   {0x67, 0x9A, 0x0C, 0x20, 0x00, 0x08, 0x96, 0x9E, 0xE2, 0x11, 0x46, 0xA1, 0x70, 0xE6, 0x55, 0x64}
 
#define BLE_WPTS_UUID128_LEN   16
 
#define BLE_WPTS_UUID_PRU_CONTROL_CHAR_OFFSET   0
 
#define BLE_WPTS_UUID_PTU_STATIC_PARAMETER_CHAR_OFFSET   1
 
#define BLE_WPTS_UUID_PRU_ALERT_CHAR_OFFSET   2
 
#define BLE_WPTS_UUID_PRU_STATIC_PARAMETER_CHAR_OFFSET   3
 
#define BLE_WPTS_UUID_PRU_DYNAMIC_PARAMETER_CHAR_OFFSET   4
 
#define BLE_WPTS_MODIFIED_BYTE   0
 
#define BLE_WPTS_HANDLE_OFFSET_PRU_CONTROL   2
 WPT Service Characteristic value handles offset relative to primary service handle. More...
 
#define BLE_WPTS_HANDLE_OFFSET_PTU_STATIC   4
 
#define BLE_WPTS_HANDLE_OFFSET_PRU_ALERT   6
 
#define BLE_WPTS_HANDLE_OFFSET_PRU_ALERT_CCCD   7
 
#define BLE_WPTS_HANDLE_OFFSET_PRU_STATIC   9
 
#define BLE_WPTS_HANDLE_OFFSET_PRU_DYNAMIC   11
 
#define BLE_WPTS_HANDLE_OFFSET_MIN   2
 
#define BLE_WPTS_HANDLE_OFFSET_MAX   11
 
#define BLE_WPTS_PRU_CONTROL_LEN   5
 Characteristic value lengths. More...
 
#define BLE_WPTS_PTU_STATIC_LEN   17
 
#define BLE_WPTS_PRU_ALERT_MIN_LEN   1
 
#define BLE_WPTS_PRU_ALERT_MAX_LEN   7
 
#define BLE_WPTS_PRU_STATIC_LEN   20
 
#define BLE_WPTS_PRU_DYNAMIC_LEN   20
 
#define BLE_WPTS_PTU_POWER_0_1W   0
 PTU Static characteristic PTU Power field. More...
 
#define BLE_WPTS_PTU_POWER_0_2W   1
 
#define BLE_WPTS_PTU_POWER_0_3W   2
 
#define BLE_WPTS_PTU_POWER_0_4W   3
 
#define BLE_WPTS_PTU_POWER_0_5W   4
 
#define BLE_WPTS_PTU_POWER_0_6W   5
 
#define BLE_WPTS_PTU_POWER_0_7W   6
 
#define BLE_WPTS_PTU_POWER_0_8W   7
 
#define BLE_WPTS_PTU_POWER_0_9W   8
 
#define BLE_WPTS_PTU_POWER_1_0W   10
 
#define BLE_WPTS_PTU_POWER_1_1W   11
 
#define BLE_WPTS_PTU_POWER_1_2W   12
 
#define BLE_WPTS_PTU_POWER_1_3W   13
 
#define BLE_WPTS_PTU_POWER_1_4W   14
 
#define BLE_WPTS_PTU_POWER_1_5W   15
 
#define BLE_WPTS_PTU_POWER_1_6W   16
 
#define BLE_WPTS_PTU_POWER_1_7W   17
 
#define BLE_WPTS_PTU_POWER_1_8W   18
 
#define BLE_WPTS_PTU_POWER_1_9W   19
 
#define BLE_WPTS_PTU_POWER_2_0W   20
 
#define BLE_WPTS_PTU_POWER_2_2W   21
 
#define BLE_WPTS_PTU_POWER_2_4W   22
 
#define BLE_WPTS_PTU_POWER_2_6W   23
 
#define BLE_WPTS_PTU_POWER_2_8W   24
 
#define BLE_WPTS_PTU_POWER_3_0W   25
 
#define BLE_WPTS_PTU_POWER_3_2W   26
 
#define BLE_WPTS_PTU_POWER_3_4W   27
 
#define BLE_WPTS_PTU_POWER_3_6W   28
 
#define BLE_WPTS_PTU_POWER_3_8W   29
 
#define BLE_WPTS_PTU_POWER_4_0W   30
 
#define BLE_WPTS_PTU_POWER_4_2W   31
 
#define BLE_WPTS_PTU_POWER_4_4W   32
 
#define BLE_WPTS_PTU_POWER_4_6W   33
 
#define BLE_WPTS_PTU_POWER_4_8W   34
 
#define BLE_WPTS_PTU_POWER_5_0W   35
 
#define BLE_WPTS_PTU_POWER_5_2W   36
 
#define BLE_WPTS_PTU_POWER_5_4W   37
 
#define BLE_WPTS_PTU_POWER_5_6W   38
 
#define BLE_WPTS_PTU_POWER_5_8W   39
 
#define BLE_WPTS_PTU_POWER_6_0W   40
 
#define BLE_WPTS_PTU_POWER_6_3W   41
 
#define BLE_WPTS_PTU_POWER_6_6W   42
 
#define BLE_WPTS_PTU_POWER_6_9W   43
 
#define BLE_WPTS_PTU_POWER_7_2W   44
 
#define BLE_WPTS_PTU_POWER_7_5W   45
 
#define BLE_WPTS_PTU_POWER_7_8W   46
 
#define BLE_WPTS_PTU_POWER_8_1W   47
 
#define BLE_WPTS_PTU_POWER_8_4W   48
 
#define BLE_WPTS_PTU_POWER_8_7W   49
 
#define BLE_WPTS_PTU_POWER_9_0W   50
 
#define BLE_WPTS_PTU_POWER_9_3W   51
 
#define BLE_WPTS_PTU_POWER_9_6W   52
 
#define BLE_WPTS_PTU_POWER_9_9W   53
 
#define BLE_WPTS_PTU_POWER_10_2W   54
 
#define BLE_WPTS_PTU_POWER_10_5W   55
 
#define BLE_WPTS_PTU_POWER_10_8W   56
 
#define BLE_WPTS_PTU_POWER_11_1W   57
 
#define BLE_WPTS_PTU_POWER_11_4W   58
 
#define BLE_WPTS_PTU_POWER_11_7W   59
 
#define BLE_WPTS_PTU_POWER_12_0W   60
 
#define BLE_WPTS_PTU_POWER_12_4W   61
 
#define BLE_WPTS_PTU_POWER_12_8W   62
 
#define BLE_WPTS_PTU_POWER_13_2W   63
 
#define BLE_WPTS_PTU_POWER_13_6W   64
 
#define BLE_WPTS_PTU_POWER_13_0W   65
 
#define BLE_WPTS_PTU_POWER_14_4W   66
 
#define BLE_WPTS_PTU_POWER_14_8W   67
 
#define BLE_WPTS_PTU_POWER_15_2W   68
 
#define BLE_WPTS_PTU_POWER_15_6W   69
 
#define BLE_WPTS_PTU_POWER_16_0W   70
 
#define BLE_WPTS_PTU_POWER_16_4W   71
 
#define BLE_WPTS_PTU_POWER_16_8W   72
 
#define BLE_WPTS_PTU_POWER_17_2W   73
 
#define BLE_WPTS_PTU_POWER_17_6W   74
 
#define BLE_WPTS_PTU_POWER_18_0W   75
 
#define BLE_WPTS_PTU_POWER_18_4W   76
 
#define BLE_WPTS_PTU_POWER_18_8W   77
 
#define BLE_WPTS_PTU_POWER_19_2W   78
 
#define BLE_WPTS_PTU_POWER_19_6W   79
 
#define BLE_WPTS_PTU_POWER_20_0W   80
 
#define BLE_WPTS_PTU_POWER_20_5W   81
 
#define BLE_WPTS_PTU_POWER_21_0W   82
 
#define BLE_WPTS_PTU_POWER_21_5W   83
 
#define BLE_WPTS_PTU_POWER_22_0W   84
 
#define BLE_WPTS_PTU_POWER_22_5W   85
 
#define BLE_WPTS_PTU_POWER_23_0W   86
 
#define BLE_WPTS_PTU_POWER_23_5W   87
 
#define BLE_WPTS_PTU_POWER_24_0W   88
 
#define BLE_WPTS_PTU_POWER_24_5W   89
 
#define BLE_WPTS_PTU_POWER_25_0W   90
 
#define BLE_WPTS_PTU_POWER_25_5W   91
 
#define BLE_WPTS_PTU_POWER_26_0W   92
 
#define BLE_WPTS_PTU_POWER_26_5W   93
 
#define BLE_WPTS_PTU_POWER_27_0W   94
 
#define BLE_WPTS_PTU_POWER_27_5W   95
 
#define BLE_WPTS_PTU_POWER_28_0W   96
 
#define BLE_WPTS_PTU_POWER_28_5W   97
 
#define BLE_WPTS_PTU_POWER_29_0W   98
 
#define BLE_WPTS_PTU_POWER_29_5W   99
 
#define BLE_WPTS_PTU_POWER_30_0W   100
 
#define BLE_WPTS_PTU_POWER_30_6W   101
 
#define BLE_WPTS_PTU_POWER_31_2W   102
 
#define BLE_WPTS_PTU_POWER_31_8W   103
 
#define BLE_WPTS_PTU_POWER_32_4W   104
 
#define BLE_WPTS_PTU_POWER_33_0W   105
 
#define BLE_WPTS_PTU_POWER_33_6W   106
 
#define BLE_WPTS_PTU_POWER_34_2W   107
 
#define BLE_WPTS_PTU_POWER_34_8W   108
 
#define BLE_WPTS_PTU_POWER_35_4W   109
 
#define BLE_WPTS_PTU_POWER_36_0W   110
 
#define BLE_WPTS_PTU_POWER_36_6W   111
 
#define BLE_WPTS_PTU_POWER_37_2W   112
 
#define BLE_WPTS_PTU_POWER_37_8W   113
 
#define BLE_WPTS_PTU_POWER_38_4W   114
 
#define BLE_WPTS_PTU_POWER_39_0W   115
 
#define BLE_WPTS_PTU_POWER_39_6W   116
 
#define BLE_WPTS_PTU_POWER_40_2W   117
 
#define BLE_WPTS_PTU_POWER_40_8W   118
 
#define BLE_WPTS_PTU_POWER_41_4W   119
 
#define BLE_WPTS_PTU_POWER_42_0W   120
 
#define BLE_WPTS_PTU_POWER_43_0W   121
 
#define BLE_WPTS_PTU_POWER_44_0W   122
 
#define BLE_WPTS_PTU_POWER_45_0W   123
 
#define BLE_WPTS_PTU_POWER_46_0W   124
 
#define BLE_WPTS_PTU_POWER_47_0W   125
 
#define BLE_WPTS_PTU_POWER_48_0W   126
 
#define BLE_WPTS_PTU_POWER_49_0W   127
 
#define BLE_WPTS_BITFIELD_WRITE(bitfield, msk, pos, val)
 Write bitfield. More...
 
#define BLE_WPTS_BITFIELD_READ(bitfield, msk, pos)   ((bitfield & msk) >> pos)
 Read bitfield. More...
 

Enumerations

enum  timer_user_op_type_t { TIMER_USER_OP_TYPE_NONE, TIMER_USER_OP_TYPE_START, TIMER_USER_OP_TYPE_STOP, TIMER_USER_OP_TYPE_STOP_ALL }
 Set of available timer operation types. More...
 
enum  ble_wpts_uuid128_t {
  BLE_WPTS_UUID128_PRU_SERVICE = 0, BLE_WPTS_UUID128_PRU_CONTROL_CHAR, BLE_WPTS_UUID128_PTU_STATIC_PARAMETER_CHAR, BLE_WPTS_UUID128_PRU_ALERT_CHAR,
  BLE_WPTS_UUID128_PRU_STATIC_PARAMETER_CHAR, BLE_WPTS_UUID128_PRU_DYNAMIC_PARAMETER_CHAR, BLE_WPTS_UUID128_CNT
}
 Identification of 128 bit UUIDs. More...
 

Functions

uint32_t ble_wpts_uuid_init (void)
 Prepare softdevice for using the WPTS 128 bit UUIDs. More...
 
void ble_wpts_uuid_get (ble_wpts_uuid128_t uuid128, ble_uuid_t *ble_uuid)
 Get ble_uuid representation of 128 bit UUID. More...