Syntax
static const struct ble_gatt_svc_def ble_svc_hr_defs[] = {
{
.type = BLE_GATT_SVC_TYPE_PRIMARY,
.uuid = BLE_UUID16_DECLARE(BLE_SVC_HR_UUID16),
.characteristics = (struct ble_gatt_chr_def[])
{ {
.uuid = BLE_UUID16_DECLARE(BLE_SVC_HR_CHR_UUID16_MEASUREMENT),
.access_cb = ble_svc_hr_access,
.val_handle = &ble_svc_hr_measurement_val_handle,
.flags = BLE_GATT_CHR_F_NOTIFY,
}, {
.uuid = BLE_UUID16_DECLARE(BLE_SVC_HR_CHR_UUID16_BODY_SENSOR_LOC),
.access_cb = ble_svc_hr_access,
.val_handle = &ble_svc_hr_body_sensor_loc_val_handle,
.flags = BLE_GATT_CHR_F_READ,
}, {
.uuid = BLE_UUID16_DECLARE(BLE_SVC_HR_CHR_UUID16_CTRL_PT),
.access_cb = ble_svc_hr_access,
.val_handle = &ble_svc_hr_ctrl_pt_val_handle,
.flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_WRITE,
}, {
0,
}
},
},
{
0,
},
};