| // 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.hci; |
| |
| using zx; |
| using fuchsia.hardware.usb.endpoint; |
| |
| /// The UsbHci protocol is implemented by a USB Host Controller driver. |
| @discoverable |
| closed protocol UsbHci { |
| /// Connects to endpoint. Returns |
| /// * ZX_ERR_NOT_FOUND: if device id and/or endpoint address does not exist. |
| /// * ZX_ERR_ALREADY_BOUND: if the endpoint is already bound. |
| strict ConnectToEndpoint(resource struct { |
| device_id uint32; |
| ep_addr uint8; |
| ep server_end:fuchsia.hardware.usb.endpoint.Endpoint; |
| }) -> () error zx.Status; |
| |
| // TODO(https://fxbug.dev/42178882): More functions to come. Equivalents to |
| // //sdk/banjo/fuchsia.hardware.usb.hci/usb-hci.fidl |
| }; |
| |
| service UsbHciService { |
| device client_end:UsbHci; |
| }; |