| # Copyright 2023 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 |
| # the License at |
| # |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| # License for the specific language governing permissions and limitations under |
| # the License. |
| |
| # This file contains Emboss definitions for Host Controller Interface packets |
| # and types found in the Bluetooth Core Specification. The Emboss compiler is |
| # used to generate a C++ header from this file. |
| |
| import "hci_common.emb" as hci |
| |
| [$default byte_order: "LittleEndian"] |
| [(cpp) namespace: "pw::bluetooth::emboss"] |
| # ============================ Test packets ============================= |
| |
| |
| struct TestCommandPacket: |
| -- Test HCI Command packet with single byte payload. |
| let hdr_size = hci.CommandHeader.$size_in_bytes |
| 0 [+hdr_size] hci.CommandHeader header |
| $next [+1] UInt payload |
| |
| |
| struct TestEventPacket: |
| -- Test HCI Event packet with single byte payload. |
| let hdr_size = hci.EventHeader.$size_in_bytes |
| 0 [+hdr_size] hci.EventHeader header |
| $next [+1] UInt payload |