Microchip® Advanced Software Framework

common/components/wifi/winc3400/ble/ble_services/heart_rate/heart_rate.h File Reference

Heart Rate Service declarations.

Copyright (c) 2017-2019 Microchip Technology Inc. and its subsidiaries.

#include "at_ble_api.h"
#include "ble_manager.h"

Macros

#define HEART_RATE_CHAR_PRESENTATION_FORMAT_DESCRIPTOR   0x0000
 Characteristic presentation format descriptor. More...
 
#define HEART_RATE_CHAR_PRESENTATION_FORMAT_EXPONENT   0x00
 Characteristic presentation format exponent. More...
 
#define HEART_RATE_CHAR_PRESENTATION_FORMAT_NAMESPACE   0x01
 Characteristic presentation format namespace. More...
 
#define HEART_RATE_CHAR_PRESENTATION_FORMAT_UNIT   HEART_RATE_SERVICE_UUID
 Characteristic presentation format unit. More...
 
#define HEART_RATE_CHAR_PRESENTATION_FORMAT_VALUE   0x04
 characteristic presentation format value More...
 
#define HR_CONTROL_POINT_RESET   (2)
 number for resetting energy expended More...
 
#define HR_MM_EX_SIZE   (2)
 maximum size of heart rate field of hr mm characteristic in bytes More...
 
#define HR_MM_FLAGS_SIZE   (1)
 maximum size of flags field of hr mm characteristic in bytes More...
 
#define HR_MM_RR_SIZE   (2 * 2)
 maximum size of rr value field of hr mm characteristic in bytes More...
 
#define HR_MM_VAL_SIZE   (2)
 maximum size of heart rate field of hr mm characteristic in bytes More...
 
#define HR_NOTIFICATION_DISABLE   (0)
 number for Enabling the notification More...
 
#define HR_NOTIFICATION_ENABLE   (1)
 number for disabling the notification More...
 

Enumerations

enum  body_sensor_location_val {
  OTHERS = 0,
  CHEST,
  WRIST,
  FINGER,
  HAND,
  EAR_LOBE,
  FOOT,
  OTHERS = 0,
  CHEST,
  WRIST,
  FINGER,
  HAND,
  EAR_LOBE,
  FOOT
}
 

Functions

void heart_rate_init_service (gatt_service_handler_t *heart_rate_serv, uint8_t *heart_rate_value)
 Heart rate service and characteristic initialization(Called only once by user). More...
 
at_ble_status_t heart_rate_primary_service_define (gatt_service_handler_t *heart_rate_service)
 Register a heart rate service instance inside stack. More...
 
at_ble_status_t heart_rate_update_char_value (gatt_service_handler_t *heart_rate_serv, uint8_t *char_data, uint8_t length)
 Update the heart rate characteristic value after defining the services using bat_primary_service_define. More...