blob: 63c39ff2a65f9cd74e18bd5e4587bbc97987d4a4 [file] [log] [blame] [edit]
// Copyright 2023 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.usb.function;
using zx;
using fuchsia.hardware.usb.endpoint;
@discoverable
closed protocol UsbFunction {
/// Connects to endpoint. Returns
/// * ZX_ERR_NOT_FOUND: if endpoint address does not exist.
/// * ZX_ERR_ALREADY_BOUND: if the endpoint is already bound.
strict ConnectToEndpoint(resource struct {
ep_addr uint8;
ep server_end:fuchsia.hardware.usb.endpoint.Endpoint;
}) -> () error zx.Status;
// TODO(fxbug.dev/96732): More functions to come. Equivalents to
// //sdk/banjo/fuchsia.hardware.usb.function/usb-function.fidl
};
service UsbFunctionService {
device client_end:UsbFunction;
};