| # Copyright 2024 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import "pw_bluetooth/hci_common.emb" as hci |
| |
| [$default byte_order: "LittleEndian"] |
| [(cpp) namespace: "bt_hci_intel"] |
| |
| struct ReadVersionTlvCommand: |
| -- This structure is used after AX210. If 'para0' is assigned with '0xff', |
| -- the new firmware would return with TLV-based values. The old firmware would silently |
| -- ignore this structure. |
| let hdr_size = hci.CommandHeader.$size_in_bytes |
| let parameter_size = $size_in_bytes - hdr_size |
| 0 [+hdr_size] hci.CommandHeader header |
| $next [+1] UInt para0 |
| |
| struct ReadVersionCommandCompleteEvent: |
| let hdr_size = hci.CommandCompleteEvent.$size_in_bytes |
| 0 [+hdr_size] hci.CommandCompleteEvent command_complete |
| $next [+1] hci.StatusCode status |
| $next [+1] UInt hw_platform |
| $next [+1] UInt hw_variant |
| $next [+1] UInt hw_revision |
| $next [+1] UInt fw_variant |
| $next [+1] UInt fw_revision |
| $next [+1] UInt fw_build_num |
| $next [+1] UInt fw_build_week |
| $next [+1] UInt fw_build_year |
| $next [+1] UInt fw_patch_num |
| |
| struct SecureSendCommandCompleteEvent: |
| let hdr_size = hci.CommandCompleteEvent.$size_in_bytes |
| 0 [+hdr_size] hci.CommandCompleteEvent command_complete |
| $next [+1] UInt param |
| |
| struct SecureSendEvent: |
| let hdr_size = hci.EventHeader.$size_in_bytes |
| 0 [+hdr_size] hci.EventHeader header |
| $next [+1] UInt vendor_event_code |
| $next [+1] UInt result |
| $next [+2] UInt opcode |
| $next [+1] UInt status |
| |
| struct ReadBootParamsCommandCompleteEvent: |
| let hdr_size = hci.CommandCompleteEvent.$size_in_bytes |
| 0 [+hdr_size] hci.CommandCompleteEvent command_complete |
| $next [+1] hci.StatusCode status |
| $next [+1] UInt otp_format |
| $next [+1] UInt otp_content |
| $next [+1] UInt otp_patch |
| $next [+2] UInt dev_revid |
| $next [+1] hci.GenericEnableParam secure_boot |
| $next [+1] UInt key_from_hdr |
| $next [+1] UInt key_type |
| $next [+1] hci.GenericEnableParam otp_lock |
| $next [+1] hci.GenericEnableParam api_lock |
| $next [+1] hci.GenericEnableParam debug_lock |
| $next [+hci.BdAddr.$size_in_bytes] hci.BdAddr address |
| $next [+1] UInt min_fw_build_num |
| $next [+1] UInt min_fw_build_week |
| $next [+1] UInt min_fw_build_year |
| $next [+1] hci.GenericEnableParam limited_cce |
| $next [+1] UInt unlocked_state |
| |
| enum MfgDisableMode: |
| [maximum_bits: 8] |
| NO_PATCHES = 0x00 |
| PATCHES_DISABLED = 0x01 |
| PATCHES_ENABLED = 0x02 |
| |
| struct MfgModeChangeCommand: |
| let hdr_size = hci.CommandHeader.$size_in_bytes |
| let parameter_size = $size_in_bytes - hdr_size |
| 0 [+hdr_size] hci.CommandHeader header |
| $next [+1] hci.GenericEnableParam enable |
| $next [+1] MfgDisableMode disable_mode |
| |
| struct VendorResetCommand: |
| let hdr_size = hci.CommandHeader.$size_in_bytes |
| let parameter_size = $size_in_bytes - hdr_size |
| 0 [+hdr_size] hci.CommandHeader header |
| $next [+1] UInt reset_type |
| $next [+1] UInt patch_enable |
| $next [+1] UInt ddc_reload |
| $next [+1] UInt boot_option |
| $next [+4] UInt boot_address |
| [byte_order: "BigEndian"] |
| |
| struct WriteBootParamsCommand: |
| let hdr_size = hci.CommandHeader.$size_in_bytes |
| 0 [+hdr_size] hci.CommandHeader header |
| $next [+4] UInt boot_address |
| $next [+1] UInt firmware_build_number |
| $next [+1] UInt firmware_build_ww |
| $next [+1] UInt firmware_build_yy |
| |
| # Copied from pw_bluetooth/hci_events.emb to avoid the significant compilation |
| # time of hci_events.emb, which ideally will not be built in Fuchsia. |
| struct SimpleCommandCompleteEvent: |
| let hdr_size = hci.CommandCompleteEvent.$size_in_bytes |
| 0 [+hdr_size] hci.CommandCompleteEvent command_complete |
| $next [+1] hci.StatusCode status |