|
Last change
on this file since d7f7a4a was d7f7a4a, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 4 years ago |
|
Replace some license headers with SPDX identifier
Headers are replaced using tools/transorm-copyright.sh only
when it can be matched verbatim with the license header used
throughout most of the codebase.
|
-
Property mode
set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * SPDX-FileCopyrightText: 2010 Vojtech Horky
|
|---|
| 3 | * SPDX-FileCopyrightText: 2018 Ondrej Hlavaty, Michal Staruch
|
|---|
| 4 | *
|
|---|
| 5 | * SPDX-License-Identifier: BSD-3-Clause
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | /** @addtogroup libdrv
|
|---|
| 9 | * @addtogroup usb
|
|---|
| 10 | * @{
|
|---|
| 11 | */
|
|---|
| 12 | /** @file
|
|---|
| 13 | * @brief USB device interface definition.
|
|---|
| 14 | */
|
|---|
| 15 |
|
|---|
| 16 | #ifndef LIBDRV_USB_IFACE_H_
|
|---|
| 17 | #define LIBDRV_USB_IFACE_H_
|
|---|
| 18 |
|
|---|
| 19 | #include "ddf/driver.h"
|
|---|
| 20 | #include <async.h>
|
|---|
| 21 | #include <usbhc_iface.h>
|
|---|
| 22 |
|
|---|
| 23 | typedef async_sess_t usb_dev_session_t;
|
|---|
| 24 |
|
|---|
| 25 | typedef struct {
|
|---|
| 26 | usb_address_t address; /**< Current USB address */
|
|---|
| 27 | uint8_t depth; /**< Depth in the hub hiearchy */
|
|---|
| 28 | usb_speed_t speed; /**< Speed of the device */
|
|---|
| 29 | devman_handle_t handle; /**< Handle to DDF function of the HC driver */
|
|---|
| 30 | /** Interface set by multi interface driver, -1 if none */
|
|---|
| 31 | int iface;
|
|---|
| 32 | } usb_device_desc_t;
|
|---|
| 33 |
|
|---|
| 34 | extern usb_dev_session_t *usb_dev_connect(devman_handle_t);
|
|---|
| 35 | extern usb_dev_session_t *usb_dev_connect_to_self(ddf_dev_t *);
|
|---|
| 36 | extern void usb_dev_disconnect(usb_dev_session_t *);
|
|---|
| 37 |
|
|---|
| 38 | extern errno_t usb_get_my_description(async_exch_t *, usb_device_desc_t *);
|
|---|
| 39 |
|
|---|
| 40 | /** USB device communication interface. */
|
|---|
| 41 | typedef struct {
|
|---|
| 42 | errno_t (*get_my_description)(ddf_fun_t *, usb_device_desc_t *);
|
|---|
| 43 | } usb_iface_t;
|
|---|
| 44 |
|
|---|
| 45 | #endif
|
|---|
| 46 | /**
|
|---|
| 47 | * @}
|
|---|
| 48 | */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.