include/bluetooth_le.h: Format with clang-format
BRANCH=none
TEST=none
#define GAP_3D_INFORMATION_DATA 0x3D
#define GAP_MANUFACTURER_SPECIFIC_DATA 0xFF
-
/* org.bluetooth.characteristic.gap.appearance.xml */
#define GAP_APPEARANCE_HID_KEYBOARD 961
/* Bluetooth Core Supplement v5 1.3 */
-
/* BLE 4.1 Vol 6 section 2.3 pg 38+ */
/* Advertising PDU Header
@@ -109,8 +107,7 @@ struct ble_adv_header {
#define BLE_ADV_HEADER_LENGTH_SHIFT 8
#define BLE_ADV_HEADER(type, tx, rx, length) \
- ((uint16_t) \
- ((((length) & 0x3f) << BLE_ADV_HEADER_LENGTH_SHIFT) | \
+ ((uint16_t)((((length)&0x3f) << BLE_ADV_HEADER_LENGTH_SHIFT) | \
(((rx)&0x1) << BLE_ADV_HEADER_RXADD_SHIFT) | \
(((tx)&0x1) << BLE_ADV_HEADER_TXADD_SHIFT) | \
(((type)&0xf) << BLE_ADV_HEADER_PDU_TYPE_SHIFT)))
@@ -180,8 +177,7 @@ struct ble_data_header {
#define BLE_DATA_HEADER_LLID_CONTROL 3
#define BLE_DATA_HEADER(llid, nesn, sn, md, length) \
- ((uint16_t) \
- ((((length) & 0x1f) << BLE_DATA_HEADER_LENGTH_SHIFT) | \
+ ((uint16_t)((((length)&0x1f) << BLE_DATA_HEADER_LENGTH_SHIFT) | \
(((MD)&0x1) << BLE_DATA_HEADER_MD_SHIFT) | \
(((SN)&0x1) << BLE_DATA_HEADER_SN_SHIFT) | \
(((NESN)&0x1) << BLE_DATA_HEADER_NESN_SHIFT) | \
