44 lines
999 B
C
44 lines
999 B
C
|
/* BLE Security example_ble_security_gatts_demo example
|
||
|
2
|
||
|
3 This example code is in the Public Domain (or CC0 licensed, at your option.)
|
||
|
4
|
||
|
5 Unless required by applicable law or agreed to in writing, this
|
||
|
6 software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||
|
7 CONDITIONS OF ANY KIND, either express or implied.
|
||
|
8 */
|
||
|
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
/*
|
||
|
* 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,
|
||
|
};
|