Arman Uguray | 1c162dc | 2015-09-29 22:30:53 -0700 | [diff] [blame] | 1 | // |
| 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 Uguray | 234138e | 2015-10-06 15:56:36 -0700 | [diff] [blame] | 19 | #include <bluetooth/uuid.h> |
Arman Uguray | 1c162dc | 2015-09-29 22:30:53 -0700 | [diff] [blame] | 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("2902"); |
| 32 | const bluetooth::UUID kHRServiceUUID("180D"); |
| 33 | const bluetooth::UUID kHRMeasurementUUID("2A37"); |
| 34 | const bluetooth::UUID kBodySensorLocationUUID("2A38"); |
| 35 | const bluetooth::UUID kHRControlPointUUID("2A39"); |
| 36 | |
| 37 | const uint8_t kHRBodyLocationOther = 0; |
| 38 | const uint8_t kHRBodyLocationChest = 1; |
| 39 | const uint8_t kHRBodyLocationWrist = 2; |
| 40 | const uint8_t kHRBodyLocationFinger = 3; |
| 41 | const uint8_t kHRBodyLocationHand = 4; |
| 42 | const uint8_t kHRBodyLocationEarLobe = 5; |
| 43 | const uint8_t kHRBodyLocationFoot = 6; |
| 44 | |
| 45 | } // namespace heart_rate |