// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include #include #include /* * DEFINES **************************************************************************************** */ #define HRPS_HT_MEAS_MAX_LEN (13) #define HRPS_MANDATORY_MASK (0x0F) #define HRPS_BODY_SENSOR_LOC_MASK (0x30) #define HRPS_HR_CTNL_PT_MASK (0xC0) ///Attributes State Machine enum { HRS_IDX_SVC, HRS_IDX_HR_MEAS_CHAR, HRS_IDX_HR_MEAS_VAL, HRS_IDX_HR_MEAS_NTF_CFG, HRS_IDX_BOBY_SENSOR_LOC_CHAR, HRS_IDX_BOBY_SENSOR_LOC_VAL, HRS_IDX_HR_CTNL_PT_CHAR, HRS_IDX_HR_CTNL_PT_VAL, HRS_IDX_NB, }; extern const esp_gatts_attr_db_t heart_rate_gatt_db[HRS_IDX_NB]; /// Heart Rate Sensor Service - only one instance for now extern const uint16_t heart_rate_svc; extern const esp_gatts_char_desc_t heart_rate_meas_char; extern const esp_gatts_char_desc_t heart_rate_body_sensor_loc_char; extern const esp_gatts_char_desc_t heart_rate_cntl_point_char;