Changes in uspace/lib/drv/include/usbhc_iface.h [d4da860:41df71f9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/include/usbhc_iface.h
rd4da860 r41df71f9 1 1 /* 2 2 * Copyright (c) 2010 Vojtech Horky 3 * Copyright (c) 201 1 Jan Vesely3 * Copyright (c) 2017 Ondrej Hlavaty 4 4 * All rights reserved. 5 5 * … … 32 32 * @{ 33 33 */ 34 35 34 /** @file 36 * @brief USB host controller interface definition. 35 * @brief USB host controler interface definition. This is the interface of 36 * USB host controller function, which can be used by usb device drivers. 37 37 */ 38 38 … … 41 41 42 42 #include "ddf/driver.h" 43 #include < usb_iface.h>44 #include < stdbool.h>43 #include <async.h> 44 #include <usb/usb.h> 45 45 46 extern int usbhc_read(async_exch_t *, usb_address_t, usb_endpoint_t, 47 uint64_t, void *, size_t, size_t *); 48 extern int usbhc_write(async_exch_t *, usb_address_t, usb_endpoint_t, 49 uint64_t, const void *, size_t); 46 extern int usbhc_reserve_default_address(async_exch_t *, usb_speed_t); 47 extern int usbhc_release_default_address(async_exch_t *); 50 48 51 /** Callback for outgoing transfer. */ 52 typedef void (*usbhc_iface_transfer_out_callback_t)(int, void *);49 extern int usbhc_device_enumerate(async_exch_t *, unsigned port); 50 extern int usbhc_device_remove(async_exch_t *, unsigned port); 53 51 54 /** Callback for incoming transfer. */ 55 typedef void (*usbhc_iface_transfer_in_callback_t)(int, size_t, void *); 52 extern int usbhc_register_endpoint(async_exch_t *, usb_endpoint_desc_t *); 53 extern int usbhc_unregister_endpoint(async_exch_t *, usb_endpoint_desc_t *); 54 extern int usbhc_read(async_exch_t *, usb_endpoint_t, uint64_t, void *, size_t, 55 size_t *); 56 extern int usbhc_write(async_exch_t *, usb_endpoint_t, uint64_t, const void *, 57 size_t); 56 58 57 /** USB host controller communication interface. */ 59 /** Defined in usb/host/usb_transfer_batch.h */ 60 typedef struct usb_transfer_batch usb_transfer_batch_t; 61 62 /** Callback for outgoing transfer - clone of usb_transfer_batch_callback_t */ 63 typedef int (*usbhc_iface_transfer_callback_t)(usb_transfer_batch_t *); 64 65 /** USB device communication interface. */ 58 66 typedef struct { 59 int (*read)(ddf_fun_t *, usb_target_t, uint64_t, uint8_t *, size_t, 60 usbhc_iface_transfer_in_callback_t, void *); 61 int (*write)(ddf_fun_t *, usb_target_t, uint64_t, const uint8_t *, 62 size_t, usbhc_iface_transfer_out_callback_t, void *); 67 int (*reserve_default_address)(ddf_fun_t *, usb_speed_t); 68 int (*release_default_address)(ddf_fun_t *); 69 70 int (*device_enumerate)(ddf_fun_t *, unsigned); 71 int (*device_remove)(ddf_fun_t *, unsigned); 72 73 int (*register_endpoint)(ddf_fun_t *, usb_endpoint_desc_t *); 74 int (*unregister_endpoint)(ddf_fun_t *, usb_endpoint_desc_t *); 75 76 int (*read)(ddf_fun_t *, usb_target_t, 77 uint64_t, char *, size_t, 78 usbhc_iface_transfer_callback_t, void *); 79 int (*write)(ddf_fun_t *, usb_target_t, 80 uint64_t, const char *, size_t, 81 usbhc_iface_transfer_callback_t, void *); 63 82 } usbhc_iface_t; 64 65 83 66 84 #endif
Note:
See TracChangeset
for help on using the changeset viewer.