diff options
author | Faraaz Sareshwala <fsareshwala@google.com> | 2024-01-19 01:40:53 +0000 |
---|---|---|
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-01-19 01:40:53 +0000 |
commit | 0b0e6706fed87eb8e70591a3ceecc7adb8d0442a (patch) | |
tree | 7272c420c3702be63e195805b79716e2a72a4c50 /pw_bluetooth | |
parent | 9b5ca82fd24f5be96ccfb1a6d61027af263d0c01 (diff) | |
download | pigweed-0b0e6706fed87eb8e70591a3ceecc7adb8d0442a.tar.gz |
pw_bluetooth: Reorganize hci_vendor.emb
The documentation for Android vendor extensions doesn't contain section
numbers or anything to externally identify an extension except for its
name. Moreover, we don't separate out the hci_vendor.emb file into
commands, events, etc like we do for the standardized commands. As such,
this change organizes hci_vendor.emb into sections based on the
extension. All types, commands, events, etc for a particular extension
are included in the same section instead of being spread out across the
entire file.
There are no other modifications in this change other than the
reorganization.
Change-Id: I0c2ad31920becc5b5e9de492a6c6f24a9c35782c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/188310
Reviewed-by: Josh Conner <joshconner@google.com>
Commit-Queue: Faraaz Sareshwala <fsareshwala@google.com>
Diffstat (limited to 'pw_bluetooth')
-rw-r--r-- | pw_bluetooth/public/pw_bluetooth/hci_vendor.emb | 135 |
1 files changed, 69 insertions, 66 deletions
diff --git a/pw_bluetooth/public/pw_bluetooth/hci_vendor.emb b/pw_bluetooth/public/pw_bluetooth/hci_vendor.emb index 7e3a0557c..8791e6157 100644 --- a/pw_bluetooth/public/pw_bluetooth/hci_vendor.emb +++ b/pw_bluetooth/public/pw_bluetooth/hci_vendor.emb @@ -23,7 +23,11 @@ import "hci_common.emb" as hci [$default byte_order: "LittleEndian"] [(cpp) namespace: "pw::bluetooth::vendor::android_hci"] -# ========================= HCI packet headers ========================== +# ======================= Android HCI extensions =============================== +# Documentation: https://source.android.com/devices/bluetooth/hci_requirements + + +# ------------------------ HCI packet headers ---------------------------------- struct AndroidCommandHeader: @@ -32,8 +36,7 @@ struct AndroidCommandHeader: 0 [+hdr_size] hci.CommandHeader header $next [+1] UInt sub_opcode -# ======================= Android HCI extensions ======================== -# Documentation: https://source.android.com/devices/bluetooth/hci_requirements +# ----------------------- Get Vendor Capabilities ------------------------------ enum Capability: @@ -42,6 +45,67 @@ enum Capability: CAPABLE = 0x01 +struct LEGetVendorCapabilitiesCommand: + let hdr_size = hci.CommandHeader.$size_in_bytes + 0 [+hdr_size] hci.CommandHeader header + + +struct LEGetVendorCapabilitiesCommandCompleteEvent: + let hdr_size = hci.CommandCompleteEvent.$size_in_bytes + 0 [+hdr_size] hci.CommandCompleteEvent command_complete + $next [+1] hci.StatusCode status + $next [+1] UInt max_advt_instances + -- Number of advertisement instances supported + -- Deprecated in Google feature spec v0.98 and higher + + $next [+1] Capability offloaded_resolution_of_private_address + -- BT chip capability of RPA + -- Deprecated in Google feature spec v0.98 and higher + + $next [+2] UInt total_scan_results_storage + -- Storage for scan results in bytes + + $next [+1] UInt max_irk_list_sz + -- Number of IRK entries supported in the firmware + + $next [+1] Capability filtering_support + -- Support for filtering in the controller + + $next [+1] UInt max_filter + -- Number of filters supported + + $next [+1] Capability activity_energy_info_support + -- Supports reporting of activity and energy information + + $next [+2] bits version_supported: + -- Specifies the version of the Google feature spec supported + 0 [+8] UInt major_number + $next [+8] UInt minor_number + + $next [+2] UInt total_num_of_advt_tracked + -- Total number of advertisers tracked for OnLost/OnFound purposes + + $next [+1] Capability extended_scan_support + -- Supports extended scan window and interval + + $next [+1] Capability debug_logging_supported + -- Supports logging of binary debug information from controller + + $next [+1] Capability le_address_generation_offloading_support + -- Deprecated in Google feature spec v0.98 and higher + + $next [+4] bits: + 0 [+5] AudioCodecSupportMask a2dp_source_offload_capability_mask + + $next [+1] Capability bluetooth_quality_report_support + -- Supports reporting of Bluetooth Quality events + + $next [+4] bits: + 0 [+5] AudioCodecSupportMask dynamic_audio_buffer_support + +# ----------------------- A2DP Offloading -------------------------------------- + + bits AudioCodecSupportMask: 0 [+1] Flag sbc 1 [+1] Flag aac @@ -183,8 +247,6 @@ struct LdacCodecInformation: $next [+24] UInt:8[24] reserved -# ============ Commands ============ - struct StartA2dpOffloadCommand: let vendor_size = AndroidCommandHeader.$size_in_bytes @@ -247,6 +309,8 @@ struct StopA2dpOffloadCommand: let vendor_size = AndroidCommandHeader.$size_in_bytes 0 [+vendor_size] AndroidCommandHeader vendor_command +# ----------------------- Multiple Advertising --------------------------------- + struct LEMultiAdvtEnableCommand: -- LE multi-advertising enable command. @@ -256,13 +320,6 @@ struct LEMultiAdvtEnableCommand: $next [+1] UInt advertising_handle -struct LEGetVendorCapabilitiesCommand: - let hdr_size = hci.CommandHeader.$size_in_bytes - 0 [+hdr_size] hci.CommandHeader header - -# ============ Events ============ - - struct LEMultiAdvtStateChangeSubevent: -- LE multi-advertising state change subevent. 0 [+hci.VendorDebugEvent.$size_in_bytes] hci.VendorDebugEvent vendor_event @@ -276,57 +333,3 @@ struct LEMultiAdvtStateChangeSubevent: $next [+2] UInt connection_handle -- Handle used to identify the connection that caused the state change (i.e. -- advertising instance to be disabled). Value will be 0xFFFF if invalid. - - -struct LEGetVendorCapabilitiesCommandCompleteEvent: - let hdr_size = hci.CommandCompleteEvent.$size_in_bytes - 0 [+hdr_size] hci.CommandCompleteEvent command_complete - $next [+1] hci.StatusCode status - $next [+1] UInt max_advt_instances - -- Number of advertisement instances supported - -- Deprecated in Google feature spec v0.98 and higher - - $next [+1] Capability offloaded_resolution_of_private_address - -- BT chip capability of RPA - -- Deprecated in Google feature spec v0.98 and higher - - $next [+2] UInt total_scan_results_storage - -- Storage for scan results in bytes - - $next [+1] UInt max_irk_list_sz - -- Number of IRK entries supported in the firmware - - $next [+1] Capability filtering_support - -- Support for filtering in the controller - - $next [+1] UInt max_filter - -- Number of filters supported - - $next [+1] Capability activity_energy_info_support - -- Supports reporting of activity and energy information - - $next [+2] bits version_supported: - -- Specifies the version of the Google feature spec supported - 0 [+8] UInt major_number - $next [+8] UInt minor_number - - $next [+2] UInt total_num_of_advt_tracked - -- Total number of advertisers tracked for OnLost/OnFound purposes - - $next [+1] Capability extended_scan_support - -- Supports extended scan window and interval - - $next [+1] Capability debug_logging_supported - -- Supports logging of binary debug information from controller - - $next [+1] Capability le_address_generation_offloading_support - -- Deprecated in Google feature spec v0.98 and higher - - $next [+4] bits: - 0 [+5] AudioCodecSupportMask a2dp_source_offload_capability_mask - - $next [+1] Capability bluetooth_quality_report_support - -- Supports reporting of Bluetooth Quality events - - $next [+4] bits: - 0 [+5] AudioCodecSupportMask dynamic_audio_buffer_support |