diff options
author | Ben <benlawson@google.com> | 2023-03-20 18:18:37 +0000 |
---|---|---|
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-03-20 18:18:37 +0000 |
commit | 192cf32af74a87a8dc7065aad3c8a88b7eea3910 (patch) | |
tree | 432293f194b855109a576766d072b4a038b35946 | |
parent | 3cbf0600ab0c909c471f81918942f61ed74a7235 (diff) | |
download | pigweed-192cf32af74a87a8dc7065aad3c8a88b7eea3910.tar.gz |
pw_bluetooth: Add Emboss LEGetVendorCapabilities command & event
Test: pw presubmit --step gn_emboss_build
Change-Id: Ie39e57c723b969eeced02f87bd6cffbc280db920
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/134360
Reviewed-by: Faraaz Sareshwala <fsareshwala@google.com>
Commit-Queue: Ben Lawson <benlawson@google.com>
-rw-r--r-- | pw_bluetooth/public/pw_bluetooth/vendor.emb | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/pw_bluetooth/public/pw_bluetooth/vendor.emb b/pw_bluetooth/public/pw_bluetooth/vendor.emb index 2c5681bf6..9ee77343a 100644 --- a/pw_bluetooth/public/pw_bluetooth/vendor.emb +++ b/pw_bluetooth/public/pw_bluetooth/vendor.emb @@ -27,6 +27,17 @@ import "hci.emb" as hci # ======================= Android HCI extensions ======================== # Documentation: https://source.android.com/devices/bluetooth/hci_requirements +enum Capability: + [maximum_bits: 8] + NOT_CAPABLE = 0x00 + CAPABLE = 0x01 + +bits AudioCodecSupportMask: + 0 [+1] Flag sbc + 1 [+1] Flag aac + 2 [+1] Flag aptx + 3 [+1] Flag aptx_hd + 4 [+1] Flag ldac # ============ Commands ============ @@ -39,6 +50,10 @@ struct LEMultiAdvtEnableCommand: $next [+1] hci.GenericEnableParam enable $next [+1] UInt advertising_handle +struct LEGetVendorCapabilitiesCommand: + let hdr_size = hci.CommandHeader.$size_in_bytes + 0 [+hdr_size] hci.CommandHeader header + # ============ Events ============ @@ -56,3 +71,42 @@ 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 |