blob: 15ec22a792200824eeee4ab7c3613a3acf13a07c [file] [log] [blame]
// Copyright 2018 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.
library fuchsia.hardware.bt.hci;
using zx;
@transport("Banjo")
@banjo_layout("ddk-protocol")
protocol BtHci {
/// Open the two-way HCI command channel for sending HCI commands and
/// receiving event packets. Returns ZX_ERR_ALREADY_BOUND if the channel
/// is already open.
OpenCommandChannel(resource struct {
channel zx.handle:CHANNEL;
}) -> (struct {
s zx.status;
});
/// Open the two-way HCI ACL data channel.
/// Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
OpenAclDataChannel(resource struct {
channel zx.handle:CHANNEL;
}) -> (struct {
s zx.status;
});
/// Open an output-only channel for monitoring HCI traffic.
/// The format of each message is: [1-octet flags] [n-octet payload]
/// The flags octet is a bitfield with the following values defined:
/// - 0x00: The payload represents a command packet sent from the host to the
/// controller.
/// - 0x01: The payload represents an event packet sent by the controller.
/// Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
OpenSnoopChannel(resource struct {
channel zx.handle:CHANNEL;
}) -> (struct {
s zx.status;
});
};