SmartSnippets DA1459x SDK
Data Structures | Typedefs | Enumerations | Functions
hrs_client.h File Reference

Heart Rate Service Client header file. More...

#include "ble_gattc.h"
#include "ble_client.h"

Go to the source code of this file.

Data Structures

struct  hrs_client_measurement_t
 Heart rate measurement information. More...
 
struct  hrs_client_callbacks_t
 HRS application callbacks. More...
 

Typedefs

typedef void(* hrs_client_heart_rate_measurement_notif_cb_t) (ble_client_t *hrs_client, hrs_client_measurement_t *measurement)
 Heart Rate Measurement notification callback. More...
 
typedef void(* hrs_client_get_event_state_completed_cb_t) (ble_client_t *hrs_client, hrs_client_event_t event, att_error_t status, bool enabled)
 Get event state completed callback. More...
 
typedef void(* hrs_client_set_event_state_completed_cb_t) (ble_client_t *hrs_client, hrs_client_event_t event, att_error_t status)
 Set event state completed callback. More...
 
typedef void(* hrs_client_read_body_sensor_location_cb_t) (ble_client_t *hrs_client, att_error_t status, hrs_client_body_sensor_location_t location)
 Read value of Body Sensor Location callback. More...
 
typedef void(* hrs_client_reset_energy_expended_completed_cb_t) (ble_client_t *hrs_client, att_error_t status)
 Reset the value of the Energy Expended callback. More...
 

Enumerations

enum  hrs_client_body_sensor_location_t {
  HRS_CLIENT_BODY_SENSOR_LOC_OTHER = 0, HRS_CLIENT_BODY_SENSOR_LOC_CHEST = 1, HRS_CLIENT_BODY_SENSOR_LOC_WRIST = 2, HRS_CLIENT_BODY_SENSOR_LOC_FINGER = 3,
  HRS_CLIENT_BODY_SENSOR_LOC_HAND = 4, HRS_CLIENT_BODY_SENSOR_LOC_EAR_LOBE = 5, HRS_CLIENT_BODY_SENSOR_LOC_FOOT = 6
}
 Body Sensor Location. More...
 
enum  hrs_client_cap_t { HRS_CLIENT_CAP_BODY_SENSOR_LOCATION = 0x01, HRS_CLIENT_CAP_HEART_RATE_CONTROL_POINT = 0x02 }
 Client capabilities bit mask. More...
 
enum  hrs_client_event_t { HRS_CLIENT_EVENT_HEART_RATE_MEASUREMENT_NOTIF = 0x01 }
 

Functions

ble_client_thrs_client_init (const hrs_client_callbacks_t *cb, const ble_evt_gattc_browse_svc_t *evt)
 Register Heart Rate Client instance. More...
 
hrs_client_cap_t hrs_client_get_capabilities (ble_client_t *hrs_client)
 Get client capabilities. More...
 
bool hrs_client_get_event_state (ble_client_t *hrs_client, hrs_client_event_t event)
 Get event characteristic indication/notification state. More...
 
bool hrs_client_set_event_state (ble_client_t *hrs_client, hrs_client_event_t event, bool enable)
 Set event characteristic indication/notification state. More...
 
bool hrs_client_read_body_sensor_location (ble_client_t *hrs_client)
 Read body sensor location. More...
 
bool hrs_client_reset_energy_expended (ble_client_t *hrs_client)
 Reset Energy Expended value to 0. More...
 
ble_client_thrs_client_init_from_data (uint16_t conn_idx, const hrs_client_callbacks_t *cb, const void *data, size_t length)
 Initialize HRS Client instance from buffered (cached) data and register application callbacks. More...
 

Detailed Description

Heart Rate Service Client header file.

Copyright (C) 2016-2018 Renesas Electronics Corporation and/or its affiliates. All rights reserved. Confidential Information.

This software ("Software") is supplied by Renesas Electronics Corporation and/or its affiliates ("Renesas"). Renesas grants you a personal, non-exclusive, non-transferable, revocable, non-sub-licensable right and license to use the Software, solely if used in or together with Renesas products. You may make copies of this Software, provided this copyright notice and disclaimer ("Notice") is included in all such copies. Renesas reserves the right to change or discontinue the Software at any time without notice.

THE SOFTWARE IS PROVIDED "AS IS". RENESAS DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. TO THE MAXIMUM EXTENT PERMITTED UNDER LAW, IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE, EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. USE OF THIS SOFTWARE MAY BE SUBJECT TO TERMS AND CONDITIONS CONTAINED IN AN ADDITIONAL AGREEMENT BETWEEN YOU AND RENESAS. IN CASE OF CONFLICT BETWEEN THE TERMS OF THIS NOTICE AND ANY SUCH ADDITIONAL LICENSE AGREEMENT, THE TERMS OF THE AGREEMENT SHALL TAKE PRECEDENCE. BY CONTINUING TO USE THIS SOFTWARE, YOU AGREE TO THE TERMS OF THIS NOTICE.IF YOU DO NOT AGREE TO THESE TERMS, YOU ARE NOT PERMITTED TO USE THIS SOFTWARE.