Changeset 9efad54 in mainline for uspace/lib/drv/include/usbhc_iface.h
- Timestamp:
- 2018-01-06T21:15:48Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 56257ba
- Parents:
- c901632
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/include/usbhc_iface.h
rc901632 r9efad54 44 44 #include <async.h> 45 45 46 typedef struct usb_pipe_desc { 47 /** Endpoint number. */ 48 usb_endpoint_t endpoint_no; 49 50 /** Endpoint transfer type. */ 51 usb_transfer_type_t transfer_type; 52 53 /** Endpoint direction. */ 54 usb_direction_t direction; 55 56 /** Maximum size of one transfer */ 57 size_t max_transfer_size; 58 } usb_pipe_desc_t; 59 60 /** This structure follows standard endpoint descriptor + superspeed companion 61 * descriptor, and exists to avoid dependency of libdrv on libusb. Keep the 62 * internal fields named exactly like their source (because we want to use the 63 * same macros to access them). 64 * Callers shall fill it with bare contents of respective descriptors (in usb endianity). 65 */ 66 typedef struct { 67 struct { 68 uint8_t endpoint_address; 69 uint8_t attributes; 70 uint16_t max_packet_size; 71 uint8_t poll_interval; 72 } endpoint; 73 74 /* Superspeed companion descriptor */ 75 struct companion_desc_t { 76 uint8_t max_burst; 77 uint8_t attributes; 78 uint16_t bytes_per_interval; 79 } companion; 80 } usb_endpoint_descriptors_t; 81 46 82 extern int usbhc_reserve_default_address(async_exch_t *, usb_speed_t); 47 83 extern int usbhc_release_default_address(async_exch_t *); … … 50 86 extern int usbhc_device_remove(async_exch_t *, unsigned port); 51 87 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 *); 88 extern int usbhc_register_endpoint(async_exch_t *, usb_pipe_desc_t *, const usb_endpoint_descriptors_t *); 89 extern int usbhc_unregister_endpoint(async_exch_t *, const usb_pipe_desc_t *); 90 54 91 extern int usbhc_read(async_exch_t *, usb_endpoint_t, uint64_t, void *, size_t, 55 92 size_t *); … … 68 105 int (*device_remove)(ddf_fun_t *, unsigned); 69 106 70 int (*register_endpoint)(ddf_fun_t *, usb_ endpoint_desc_t *);71 int (*unregister_endpoint)(ddf_fun_t *, usb_endpoint_desc_t *);107 int (*register_endpoint)(ddf_fun_t *, usb_pipe_desc_t *, const usb_endpoint_descriptors_t *); 108 int (*unregister_endpoint)(ddf_fun_t *, const usb_pipe_desc_t *); 72 109 73 110 int (*read)(ddf_fun_t *, usb_target_t,
Note:
See TracChangeset
for help on using the changeset viewer.