Fix build warnings

This commit is contained in:
Puck Meerburg
2026-02-06 18:09:21 +00:00
parent 4eb0c6cdd2
commit 634ebad7cd
6 changed files with 26 additions and 27 deletions

View File

@@ -71,7 +71,7 @@ uint8_t scanRspData[31] = {
GAP_ADTYPE_LOCAL_NAME_COMPLETE,
'L', 'S', 'L', 'E', 'D', ' ', 'B', 'a', 'd', 'g', 'e', ' ', 'W', 'i', 't', 'c', 'h', 0,
0, 0, 0, 0,
0, 0,
};
static gapRolesBroadcasterCBs_t broadcast_handlers = {
@@ -89,17 +89,17 @@ static gapBondCBs_t bond_managers = {
0,
};
static const uint16_t service_uuid = 0xFEE0;
static const gattAttrType_t service = {2, (uint8_t *) &service_uuid};
static const uint8_t service_uuid[2] = {LO_UINT16(0xFEE0), HI_UINT16(0xFEE0)};
static const gattAttrType_t service = {2, service_uuid};
static const uint16_t rx_char_uuid = 0xFEE1;
static const uint8_t rx_char_uuid[2] = {LO_UINT16(0xFEE1), HI_UINT16(0xFEE1)};
static uint8_t rx_char_props = GATT_PROP_WRITE;
static uint8_t rx_char_val[16];
static gattAttribute_t attr_table[] = {
{{2, &primaryServiceUUID}, GATT_PERMIT_READ, 0, &service},
{{2, &characterUUID}, GATT_PERMIT_READ, 0, &rx_char_props},
{{2, &rx_char_uuid}, GATT_PERMIT_WRITE, 0, &rx_char_val},
{{2, primaryServiceUUID}, GATT_PERMIT_READ, 0, (uint8_t *)&service},
{{2, characterUUID}, GATT_PERMIT_READ, 0, &rx_char_props},
{{2, rx_char_uuid}, GATT_PERMIT_WRITE, 0, (uint8_t *)&rx_char_val},
};
uint16_t blefb[44] = {0};
@@ -108,7 +108,7 @@ static bStatus_t write_handler(uint16_t conn_handle, gattAttribute_t *pAttr, uin
if (gattPermitAuthorWrite(pAttr->permissions)) return ATT_ERR_INSUFFICIENT_AUTHOR;
uint16_t uuid = BUILD_UINT16(pAttr->type.uuid[0], pAttr->type.uuid[1]);
if (uuid != rx_char_uuid) return ATT_ERR_ATTR_NOT_FOUND;
if (uuid != 0xFEE1) return ATT_ERR_ATTR_NOT_FOUND;
wang_rx(pValue, len);