pw_bluetooth: Format emboss files

And tweak header comments.

Change-Id: I7456c827b9728c226d69b1b7e3551df3bc84164a
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/219351
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Reviewed-by: Ali Saeed <saeedali@google.com>
Commit-Queue: David Rees <drees@google.com>
Pigweed-Auto-Submit: David Rees <drees@google.com>
This commit is contained in:
David Rees 2024-07-01 19:13:01 +00:00 committed by CQ Bot Account
parent 9324fd3b8e
commit 324824be01
4 changed files with 19 additions and 19 deletions

View File

@ -12,13 +12,13 @@
# License for the specific language governing permissions and limitations under
# the License.
import "pw_bluetooth/hci_data.emb" as hci
import "pw_bluetooth/l2cap_frames.emb" as l2cap
# This file contains Emboss definitions of the protocol data units (PDUs)
# associated with the Attribute Protocol (ATT) as defined in Vol 3 (Host), Part
# F of the Bluetooth Core Specification.
#
# The Emboss compiler is used to generate a C++ header from this file.
# F of the Bluetooth Core Specification. The Emboss compiler is used to generate
# a C++ header from this file.
import "pw_bluetooth/hci_data.emb" as hci
import "pw_bluetooth/l2cap_frames.emb" as l2cap
[$default byte_order: "LittleEndian"]
[(cpp) namespace: "pw::bluetooth::emboss"]

View File

@ -681,9 +681,11 @@ struct PinCodeRequestReplyCommand:
0 [+hdr_size] hci.CommandHeader header
$next [+hci.BdAddr.$size_in_bytes] hci.BdAddr bd_addr
-- BD_ADDR of the device which the PIN code is for
$next [+1] UInt pin_code_length
-- Length of the PIN code in octets
[requires: 0x01 <= this <= 0x10]
$next [+16] UInt:8[16] pin_code
@ -695,7 +697,6 @@ struct PinCodeRequestNegativeReplyCommand:
$next [+hci.BdAddr.$size_in_bytes] hci.BdAddr bd_addr
-- BD_ADDR of the peer device that the host is responding to
# 7.1.14 Change Connection Packet Type command
# HCI_Change_Connection_Packet_Type
# TODO: b/265052417 - Definition needs to be added
@ -1132,16 +1133,15 @@ struct ReadPinTypeCommand:
-- 7.3.5 Read PIN Type command (v1.1) (BR/EDR)
-- HCI_Read_PIN_Type
let hdr_size = hci.CommandHeader.$size_in_bytes
0 [+hdr_size] hci.CommandHeader header
0 [+hdr_size] hci.CommandHeader header
struct WritePinTypeCommand:
-- 7.3.6 Write PIN Type command (v1.1) (BR/EDR)
-- HCI_Write_PIN_Type
let hdr_size = hci.CommandHeader.$size_in_bytes
0 [+hdr_size] hci.CommandHeader header
$next [+1] hci.PinType pin_type
0 [+hdr_size] hci.CommandHeader header
$next [+1] hci.PinType pin_type
# 7.3.8 Read Stored Link Key command
# HCI_Read_Stored_Link_Key

View File

@ -903,16 +903,16 @@ struct PinCodeRequestNegativeReplyCommandCompleteEvent:
struct ReadPinTypeCommandCompleteEvent:
-- 7.7.14 Command Complete event (7.3.5 Read PIN Type command)
let hdr_size = hci.CommandCompleteEvent.$size_in_bytes
0 [+hdr_size] hci.CommandCompleteEvent command_complete
$next [+1] hci.StatusCode status
$next [+1] hci.PinType pin_type
0 [+hdr_size] hci.CommandCompleteEvent command_complete
$next [+1] hci.StatusCode status
$next [+1] hci.PinType pin_type
struct WritePinTypeCommandCompleteEvent:
-- 7.7.14 Command Complete event (7.3.6 Write PIN Type command)
let hdr_size = hci.CommandCompleteEvent.$size_in_bytes
0 [+hdr_size] hci.CommandCompleteEvent command_complete
$next [+1] hci.StatusCode status
0 [+hdr_size] hci.CommandCompleteEvent command_complete
$next [+1] hci.StatusCode status
struct ReadLocalVersionInfoCommandCompleteEvent:

View File

@ -1,4 +1,4 @@
# Copyright 2023 The Pigweed Authors
# Copyright 2024 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@ -12,12 +12,12 @@
# License for the specific language governing permissions and limitations under
# the License.
[$default byte_order: "LittleEndian"]
[(cpp) namespace: "pw::bluetooth::emboss"]
# This file contins Emboss definitions for the logical link control and
# This file contains Emboss definitions for the logical link control and
# adaptation protocol (l2cap) frames found in the Bluetooth core specification.
# The Emboss compiler is used to generate a C++ header from this file.
[$default byte_order: "LittleEndian"]
[(cpp) namespace: "pw::bluetooth::emboss"]
# ========================= Data Packet Format =================================
# Core Spec v5.4 Vol 3, Part A, Section 3