ble_svc_dis_defs variable
Syntax
static const struct ble_gatt_svc_def ble_svc_dis_defs[] = {
{
.type = BLE_GATT_SVC_TYPE_PRIMARY,
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_UUID16),
.characteristics = (struct ble_gatt_chr_def[]) { {
#if (MYNEWT_VAL(BLE_SVC_DIS_MODEL_NUMBER_READ_PERM) >= 0)
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_MODEL_NUMBER),
.access_cb = ble_svc_dis_access,
.flags = BLE_GATT_CHR_F_READ |
MYNEWT_VAL(BLE_SVC_DIS_MODEL_NUMBER_READ_PERM),
}, {
#endif
#if (MYNEWT_VAL(BLE_SVC_DIS_SERIAL_NUMBER_READ_PERM) >= 0)
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_SERIAL_NUMBER),
.access_cb = ble_svc_dis_access,
.flags = BLE_GATT_CHR_F_READ |
MYNEWT_VAL(BLE_SVC_DIS_SERIAL_NUMBER_READ_PERM),
}, {
#endif
#if (MYNEWT_VAL(BLE_SVC_DIS_HARDWARE_REVISION_READ_PERM) >= 0)
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_HARDWARE_REVISION),
.access_cb = ble_svc_dis_access,
.flags = BLE_GATT_CHR_F_READ |
MYNEWT_VAL(BLE_SVC_DIS_HARDWARE_REVISION_READ_PERM),
}, {
#endif
#if (MYNEWT_VAL(BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM) >= 0)
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_FIRMWARE_REVISION),
.access_cb = ble_svc_dis_access,
.flags = BLE_GATT_CHR_F_READ |
MYNEWT_VAL(BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM),
}, {
#endif
#if (MYNEWT_VAL(BLE_SVC_DIS_SOFTWARE_REVISION_READ_PERM) >= 0)
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_SOFTWARE_REVISION),
.access_cb = ble_svc_dis_access,
.flags = BLE_GATT_CHR_F_READ |
MYNEWT_VAL(BLE_SVC_DIS_SOFTWARE_REVISION_READ_PERM),
}, {
#endif
#if (MYNEWT_VAL(BLE_SVC_DIS_MANUFACTURER_NAME_READ_PERM) >= 0)
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_MANUFACTURER_NAME),
.access_cb = ble_svc_dis_access,
.flags = BLE_GATT_CHR_F_READ |
MYNEWT_VAL(BLE_SVC_DIS_MANUFACTURER_NAME_READ_PERM),
}, {
#endif
#if (MYNEWT_VAL(BLE_SVC_DIS_SYSTEM_ID_READ_PERM) >= 0)
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_SYSTEM_ID),
.access_cb = ble_svc_dis_access,
.flags = BLE_GATT_CHR_F_READ |
MYNEWT_VAL(BLE_SVC_DIS_SYSTEM_ID_READ_PERM),
}, {
#endif
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_IEEE_REG_CERT_LIST),
.access_cb = ble_svc_dis_access,
.flags = BLE_GATT_CHR_F_READ,
}, {
#if (MYNEWT_VAL(BLE_SVC_DIS_PNP_ID_READ_PERM) >= 0)
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_PNP_ID),
.access_cb = ble_svc_dis_access,
.flags = BLE_GATT_CHR_F_READ |
MYNEWT_VAL(BLE_SVC_DIS_PNP_ID_READ_PERM),
}, {
#endif
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_UDI),
.access_cb = ble_svc_dis_access,
.flags = BLE_GATT_CHR_F_READ
}, {
0,
}, }
},
{
0,
},
};