1# Copyright 2023 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15# This file contains Emboss definitions for Host Controller Interface packets 16# and types found in the Bluetooth Core Specification. The Emboss compiler is 17# used to generate a C++ header from this file. 18 19import "pw_bluetooth/hci_common.emb" as hci 20 21[$default byte_order: "LittleEndian"] 22[(cpp) namespace: "pw::bluetooth::emboss"] 23# ============================ Test packets ============================= 24 25 26struct TestCommandPacket: 27 -- Test HCI Command packet with single byte payload. 28 let hdr_size = hci.CommandHeader.$size_in_bytes 29 0 [+hdr_size] hci.CommandHeader header 30 $next [+1] UInt payload 31 32 33struct TestEventPacket: 34 -- Test HCI Event packet with single byte payload. 35 let hdr_size = hci.EventHeader.$size_in_bytes 36 0 [+hdr_size] hci.EventHeader header 37 $next [+1] UInt payload 38