Heart Rate Service Client API. More...
#include "gr_includes.h"
#include "ble_prf_types.h"
#include "custom_config.h"
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Classes | |
struct | hrs_c_hr_meas_t |
Heart Rate Measurement characteristic value structure. More... | |
struct | hrs_c_handles_t |
Handles on the connected peer device needed to interact with it. More... | |
struct | hrs_c_evt_t |
Heart Rate Service Client event. More... | |
Macros | |
#define | HRS_C_CONNECTION_MAX 10 |
Maximum number of HRS Client connections. More... | |
#define | HRS_C_RR_INTERVALS_NUM_MAX 9 |
Maximum number of RR intervals in HRS notifications. More... | |
#define | HRS_C_CTRL_POINT_ENERGY_EXP 0x01 |
Value for control point characteristic. More... | |
Typedefs | |
typedef void(* | hrs_c_evt_handler_t) (hrs_c_evt_t *p_evt) |
Heart Rate Service Client event handler type. More... | |
Enumerations | |
enum | hrs_c_evt_type_t { HRS_C_EVT_INVALID, HRS_C_EVT_DISCOVERY_COMPLETE, HRS_C_EVT_DISCOVERY_FAIL, HRS_C_EVT_HR_MEAS_NTF_SET_SUCCESS, HRS_C_EVT_HR_MEAS_VAL_RECEIVE, HRS_C_EVT_SENSOR_LOC_READ_RSP, HRS_C_EVT_CTRL_POINT_SET, HRS_C_EVT_WRITE_OP_ERR } |
Heart Rate Service Client event type. More... | |
enum | hrs_c_flag_bit_t { HRS_C_BIT_RATE_FORMAT = 0x01, HRS_C_BIT_SENSOR_CONTACT_DETECTED = 0x02, HRS_C_BIT_SENSOR_CONTACT_SUPPORTED = 0x04, HRS_C_BIT_ENERGY_EXPENDED_STATUS = 0x08, HRS_C_BIT_INTERVAL = 0x10 } |
Heart Rate Service Measurement flag bit. More... | |
enum | hrs_c_sensor_loc_t { HRS_C_SENS_LOC_OTHER, HRS_C_SENS_LOC_CHEST, HRS_C_SENS_LOC_WRIST, HRS_C_SENS_LOC_FINGER, HRS_C_SENS_LOC_HAND, HRS_C_SENS_LOC_EARLOBE, HRS_C_SENS_LOC_FOOT } |
Values for sensor location. More... | |
Functions | |
sdk_err_t | hrs_client_init (hrs_c_evt_handler_t evt_handler) |
Register HRS Client event handler. More... | |
sdk_err_t | hrs_c_disc_srvc_start (uint8_t conn_idx) |
Discovery Heart Rate Service on peer. More... | |
sdk_err_t | hrs_c_heart_rate_meas_notify_set (uint8_t conn_idx, bool is_enable) |
Enable or disable peer Heart Rate Measurement characteristic notify. More... | |
sdk_err_t | hrs_c_sensor_loc_read (uint8_t conn_idx) |
Read Sensor Location characteristic value. More... | |
sdk_err_t | hrs_c_ctrl_point_set (uint8_t conn_idx, uint16_t ctrl_value) |
Set Control Point characteristic value. More... | |
Heart Rate Service Client API.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file hrs_c.h.