blob: 6159997cf04a8785f07660495b18a1cdcfc975a9 [file] [log] [blame]
Arman Uguray1c162dc2015-09-29 22:30:53 -07001//
2// Copyright (C) 2015 Google, Inc.
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at:
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17#pragma once
18
Arman Uguray234138e2015-10-06 15:56:36 -070019#include <bluetooth/uuid.h>
Arman Uguray1c162dc2015-09-29 22:30:53 -070020
21// This header defines constants specific to the GATT Heart Rate Service.
22
23namespace heart_rate {
24
25// HR Measurement characteristic value flags
26const uint8_t kHRValueFormat8Bit = (0 << 0);
27const uint8_t kHRValueFormat16Bit = (1 << 0);
28const uint16_t kHRSensorContactDetected = (3 << 1);
29const uint8_t kHREnergyExpendedPresent = (1 << 3);
30
31const bluetooth::UUID kCCCDescriptorUUID("2902");
32const bluetooth::UUID kHRServiceUUID("180D");
33const bluetooth::UUID kHRMeasurementUUID("2A37");
34const bluetooth::UUID kBodySensorLocationUUID("2A38");
35const bluetooth::UUID kHRControlPointUUID("2A39");
36
37const uint8_t kHRBodyLocationOther = 0;
38const uint8_t kHRBodyLocationChest = 1;
39const uint8_t kHRBodyLocationWrist = 2;
40const uint8_t kHRBodyLocationFinger = 3;
41const uint8_t kHRBodyLocationHand = 4;
42const uint8_t kHRBodyLocationEarLobe = 5;
43const uint8_t kHRBodyLocationFoot = 6;
44
45} // namespace heart_rate