Bluetooth: host: Use definitions of UUID values instead of constants
Use the definitions of UUID values instead of magic constants with explanation in comment. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
1b89ea50dc
commit
22218129a6
1 changed files with 10 additions and 10 deletions
|
@ -579,11 +579,11 @@ static uint8_t gen_hash_m(const struct bt_gatt_attr *attr, uint16_t handle,
|
|||
|
||||
switch (u16->val) {
|
||||
/* Attributes to hash: handle + UUID + value */
|
||||
case 0x2800: /* GATT Primary Service */
|
||||
case 0x2801: /* GATT Secondary Service */
|
||||
case 0x2802: /* GATT Include Service */
|
||||
case 0x2803: /* GATT Characteristic */
|
||||
case 0x2900: /* GATT Characteristic Extended Properties */
|
||||
case BT_UUID_GATT_PRIMARY_VAL:
|
||||
case BT_UUID_GATT_SECONDARY_VAL:
|
||||
case BT_UUID_GATT_INCLUDE_VAL:
|
||||
case BT_UUID_GATT_CHRC_VAL:
|
||||
case BT_UUID_GATT_CEP_VAL:
|
||||
value = sys_cpu_to_le16(handle);
|
||||
if (tc_cmac_update(&state->state, (uint8_t *)&value,
|
||||
sizeof(handle)) == TC_CRYPTO_FAIL) {
|
||||
|
@ -612,11 +612,11 @@ static uint8_t gen_hash_m(const struct bt_gatt_attr *attr, uint16_t handle,
|
|||
|
||||
break;
|
||||
/* Attributes to hash: handle + UUID */
|
||||
case 0x2901: /* GATT Characteristic User Descriptor */
|
||||
case 0x2902: /* GATT Client Characteristic Configuration */
|
||||
case 0x2903: /* GATT Server Characteristic Configuration */
|
||||
case 0x2904: /* GATT Characteristic Presentation Format */
|
||||
case 0x2905: /* GATT Characteristic Aggregated Format */
|
||||
case BT_UUID_GATT_CUD_VAL:
|
||||
case BT_UUID_GATT_CCC_VAL:
|
||||
case BT_UUID_GATT_SCC_VAL:
|
||||
case BT_UUID_GATT_CPF_VAL:
|
||||
case BT_UUID_GATT_CAF_VAL:
|
||||
value = sys_cpu_to_le16(handle);
|
||||
if (tc_cmac_update(&state->state, (uint8_t *)&value,
|
||||
sizeof(handle)) == TC_CRYPTO_FAIL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue