• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 //  Copyright 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 
19 #include <bluetooth/uuid.h>
20 
21 // This header defines constants specific to the GATT Heart Rate Service.
22 
23 namespace heart_rate {
24 
25 // HR Measurement characteristic value flags
26 const uint8_t kHRValueFormat8Bit = (0 << 0);
27 const uint8_t kHRValueFormat16Bit = (1 << 0);
28 const uint16_t kHRSensorContactDetected = (3 << 1);
29 const uint8_t kHREnergyExpendedPresent = (1 << 3);
30 
31 const bluetooth::Uuid kCCCDescriptorUuid = bluetooth::Uuid::FromString("2902");
32 const bluetooth::Uuid kHRServiceUuid = bluetooth::Uuid::FromString("180D");
33 const bluetooth::Uuid kHRMeasurementUuid = bluetooth::Uuid::FromString("2A37");
34 const bluetooth::Uuid kBodySensorLocationUuid =
35     bluetooth::Uuid::FromString("2A38");
36 const bluetooth::Uuid kHRControlPointUuid = bluetooth::Uuid::FromString("2A39");
37 
38 const uint8_t kHRBodyLocationOther = 0;
39 const uint8_t kHRBodyLocationChest = 1;
40 const uint8_t kHRBodyLocationWrist = 2;
41 const uint8_t kHRBodyLocationFinger = 3;
42 const uint8_t kHRBodyLocationHand = 4;
43 const uint8_t kHRBodyLocationEarLobe = 5;
44 const uint8_t kHRBodyLocationFoot = 6;
45 
46 }  // namespace heart_rate
47