![]() |
Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
|
This is the client for the Heart Rate Service. More...
This is the client for the Heart Rate Service.
Data Structures | |
struct | st_ble_hrc_meas_flags_t |
Heart Rate Measurement Flags value structure. More... | |
struct | st_ble_hrc_meas_t |
Heart Rate Measurement value structure. More... | |
struct | st_ble_hrc_meas_attr_hdl_t |
Heart Rate Measurement attribute handle value. More... | |
struct | st_ble_hrc_body_sensor_location_attr_hdl_t |
Body Sensor Location attribute handle value. More... | |
struct | st_ble_hrc_heart_rate_cp_attr_hdl_t |
Heart Rate Control Point attribute handle value. More... | |
struct | st_ble_hrc_evt_data_t |
Heart Rate client event data. More... | |
Macros | |
#define | BLE_HRC_MEAS_UUID (0x2A37) |
#define | BLE_HRC_MEAS_LEN (20) |
#define | BLE_HRC_MEAS_CLI_CNFG_UUID (0x2902) |
#define | BLE_HRC_MEAS_CLI_CNFG_LEN (2) |
#define | BLE_HRC_BODY_SENSOR_LOCATION_UUID (0x2A38) |
#define | BLE_HRC_BODY_SENSOR_LOCATION_LEN (1) |
#define | BLE_HRC_HEART_RATE_CP_UUID (0x2A39) |
#define | BLE_HRC_HEART_RATE_CP_LEN (1) |
#define | BLE_HRC_HEART_RATE_CONTROL_POINT_NOT_SUPPORTED_ERROR (BLE_ERR_GROUP_GATT | 0x80) |
Heart Rate Control Point Not Supported. More... | |
Enumerations | |
enum | e_ble_hrc_body_sensor_location_body_sensor_location_t { BLE_HRC_BODY_SENSOR_LOCATION_BODY_SENSOR_LOCATION_OTHER = 0, BLE_HRC_BODY_SENSOR_LOCATION_BODY_SENSOR_LOCATION_CHEST = 1, BLE_HRC_BODY_SENSOR_LOCATION_BODY_SENSOR_LOCATION_WRIST = 2, BLE_HRC_BODY_SENSOR_LOCATION_BODY_SENSOR_LOCATION_FINGER = 3, BLE_HRC_BODY_SENSOR_LOCATION_BODY_SENSOR_LOCATION_HAND = 4, BLE_HRC_BODY_SENSOR_LOCATION_BODY_SENSOR_LOCATION_EAR_LOBE = 5, BLE_HRC_BODY_SENSOR_LOCATION_BODY_SENSOR_LOCATION_FOOT = 6 } |
Body Sensor Location Body Sensor Location enumeration. More... | |
enum | e_ble_hrc_heart_rate_cp_heart_rate_control_point_t { BLE_HRC_HEART_RATE_CP_HEART_RATE_CONTROL_POINT_RESET_ENERGY_EXPENDED = 1 } |
Heart Rate Control Point Heart Rate Control Point enumeration. More... | |
enum | e_ble_hrc_char_idx_t { BLE_HRC_MEAS_IDX, BLE_HRC_MEAS_CLI_CNFG_IDX, BLE_HRC_BODY_SENSOR_LOCATION_IDX, BLE_HRC_HEART_RATE_CP_IDX } |
Heart Rate characteristic ID. More... | |
enum | e_ble_hrc_event_t { BLE_HRC_EVENT_MEAS_HDL_VAL_NTF = BLE_SERVC_ATTR_EVENT(BLE_HRC_MEAS_IDX, BLE_SERVC_HDL_VAL_NTF), BLE_HRC_EVENT_MEAS_CLI_CNFG_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_HRC_MEAS_CLI_CNFG_IDX, BLE_SERVC_READ_RSP), BLE_HRC_EVENT_MEAS_CLI_CNFG_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_HRC_MEAS_CLI_CNFG_IDX, BLE_SERVC_WRITE_RSP), BLE_HRC_EVENT_BODY_SENSOR_LOCATION_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_HRC_BODY_SENSOR_LOCATION_IDX, BLE_SERVC_READ_RSP), BLE_HRC_EVENT_HEART_RATE_CP_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_HRC_HEART_RATE_CP_IDX, BLE_SERVC_WRITE_RSP) } |
Heart Rate client event type. More... | |
Functions | |
ble_status_t | R_BLE_HRC_ReadMeasCliCnfg (uint16_t conn_hdl) |
Read Heart Rate Measurement characteristic Client Characteristic Configuration descriptor value from the remote GATT database. More... | |
ble_status_t | R_BLE_HRC_WriteMeasCliCnfg (uint16_t conn_hdl, const uint16_t *p_value) |
Write Heart Rate Measurement characteristic Client Characteristic Configuration descriptor value to remote GATT database. More... | |
void | R_BLE_HRC_GetMeasAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_hrc_meas_attr_hdl_t *p_hdl) |
Get Heart Rate Measurement attribute handles. More... | |
ble_status_t | R_BLE_HRC_ReadBodySensorLocation (uint16_t conn_hdl) |
Read Body Sensor Location characteristic value from the remote GATT database. More... | |
void | R_BLE_HRC_GetBodySensorLocationAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_hrc_body_sensor_location_attr_hdl_t *p_hdl) |
Get Body Sensor Location attribute handles. More... | |
ble_status_t | R_BLE_HRC_WriteHeartRateCp (uint16_t conn_hdl, const uint8_t *p_value) |
Write Heart Rate Control Point characteristic value to remote GATT database. More... | |
void | R_BLE_HRC_GetHeartRateCpAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_hrc_heart_rate_cp_attr_hdl_t *p_hdl) |
Get Heart Rate Control Point attribute handles. More... | |
ble_status_t | R_BLE_HRC_Init (ble_servc_app_cb_t cb) |
Initialize Heart Rate client. More... | |
void | R_BLE_HRC_ServDiscCb (uint16_t conn_hdl, uint8_t serv_idx, uint16_t type, void *p_param) |
Heart Rate client discovery callback. More... | |
void | R_BLE_HRC_GetServAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_gatt_hdl_range_t *p_hdl) |
Get Heart Rate client attribute handle. More... | |
#define BLE_HRC_HEART_RATE_CONTROL_POINT_NOT_SUPPORTED_ERROR (BLE_ERR_GROUP_GATT | 0x80) |
Heart Rate Control Point Not Supported.
Body Sensor Location Body Sensor Location enumeration.
enum e_ble_hrc_char_idx_t |
Heart Rate characteristic ID.
enum e_ble_hrc_event_t |
Heart Rate client event type.
ble_status_t R_BLE_HRC_ReadMeasCliCnfg | ( | uint16_t | conn_hdl | ) |
Read Heart Rate Measurement characteristic Client Characteristic Configuration descriptor value from the remote GATT database.
[in] | conn_hdl | Connection handle. |
ble_status_t R_BLE_HRC_WriteMeasCliCnfg | ( | uint16_t | conn_hdl, |
const uint16_t * | p_value | ||
) |
Write Heart Rate Measurement characteristic Client Characteristic Configuration descriptor value to remote GATT database.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Heart Rate Measurement characteristic Client Characteristic Configuration descriptor value to write. |
void R_BLE_HRC_GetMeasAttrHdl | ( | const st_ble_dev_addr_t * | p_addr, |
st_ble_hrc_meas_attr_hdl_t * | p_hdl | ||
) |
Get Heart Rate Measurement attribute handles.
[in] | p_addr | Bluetooth device address for the attribute handles. |
[out] | p_hdl | The pointer to store the retrieved attribute handles. |
ble_status_t R_BLE_HRC_ReadBodySensorLocation | ( | uint16_t | conn_hdl | ) |
Read Body Sensor Location characteristic value from the remote GATT database.
[in] | conn_hdl | Connection handle. |
void R_BLE_HRC_GetBodySensorLocationAttrHdl | ( | const st_ble_dev_addr_t * | p_addr, |
st_ble_hrc_body_sensor_location_attr_hdl_t * | p_hdl | ||
) |
Get Body Sensor Location attribute handles.
[in] | p_addr | Bluetooth device address for the attribute handles. |
[out] | p_hdl | The pointer to store the retrieved attribute handles. |
ble_status_t R_BLE_HRC_WriteHeartRateCp | ( | uint16_t | conn_hdl, |
const uint8_t * | p_value | ||
) |
Write Heart Rate Control Point characteristic value to remote GATT database.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Heart Rate Control Point characteristic value to write. |
void R_BLE_HRC_GetHeartRateCpAttrHdl | ( | const st_ble_dev_addr_t * | p_addr, |
st_ble_hrc_heart_rate_cp_attr_hdl_t * | p_hdl | ||
) |
Get Heart Rate Control Point attribute handles.
[in] | p_addr | Bluetooth device address for the attribute handles. |
[out] | p_hdl | The pointer to store the retrieved attribute handles. |
ble_status_t R_BLE_HRC_Init | ( | ble_servc_app_cb_t | cb | ) |
void R_BLE_HRC_ServDiscCb | ( | uint16_t | conn_hdl, |
uint8_t | serv_idx, | ||
uint16_t | type, | ||
void * | p_param | ||
) |
Heart Rate client discovery callback.
[in] | conn_hdl | Connection handle |
[in] | serv_idx | Service instance index. |
[in] | type | Service discovery event type. |
[in] | p_param | Service discovery event parameter. |
void R_BLE_HRC_GetServAttrHdl | ( | const st_ble_dev_addr_t * | p_addr, |
st_ble_gatt_hdl_range_t * | p_hdl | ||
) |
Get Heart Rate client attribute handle.
[in] | p_addr | Bluetooth device address for the attribute handles. |
[out] | p_hdl | The pointer to store the retrieved attribute handles. |