Changeset b7fd2a0 in mainline for uspace/lib/drv/include/usb_iface.h
- Timestamp:
- 2018-01-13T03:10:29Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/include/usb_iface.h
r36f0738 rb7fd2a0 95 95 extern void usb_dev_disconnect(usb_dev_session_t *); 96 96 97 extern int usb_get_my_interface(async_exch_t *, int *);98 extern int usb_get_my_device_handle(async_exch_t *, devman_handle_t *);97 extern errno_t usb_get_my_interface(async_exch_t *, int *); 98 extern errno_t usb_get_my_device_handle(async_exch_t *, devman_handle_t *); 99 99 100 extern int usb_reserve_default_address(async_exch_t *, usb_speed_t);101 extern int usb_release_default_address(async_exch_t *);100 extern errno_t usb_reserve_default_address(async_exch_t *, usb_speed_t); 101 extern errno_t usb_release_default_address(async_exch_t *); 102 102 103 extern int usb_device_enumerate(async_exch_t *, unsigned port);104 extern int usb_device_remove(async_exch_t *, unsigned port);103 extern errno_t usb_device_enumerate(async_exch_t *, unsigned port); 104 extern errno_t usb_device_remove(async_exch_t *, unsigned port); 105 105 106 extern int usb_register_endpoint(async_exch_t *, usb_endpoint_t,106 extern errno_t usb_register_endpoint(async_exch_t *, usb_endpoint_t, 107 107 usb_transfer_type_t, usb_direction_t, size_t, unsigned, unsigned); 108 extern int usb_unregister_endpoint(async_exch_t *, usb_endpoint_t,108 extern errno_t usb_unregister_endpoint(async_exch_t *, usb_endpoint_t, 109 109 usb_direction_t); 110 extern int usb_read(async_exch_t *, usb_endpoint_t, uint64_t, void *, size_t,110 extern errno_t usb_read(async_exch_t *, usb_endpoint_t, uint64_t, void *, size_t, 111 111 size_t *); 112 extern int usb_write(async_exch_t *, usb_endpoint_t, uint64_t, const void *,112 extern errno_t usb_write(async_exch_t *, usb_endpoint_t, uint64_t, const void *, 113 113 size_t); 114 114 115 115 /** Callback for outgoing transfer. */ 116 typedef void (*usb_iface_transfer_out_callback_t)( int, void *);116 typedef void (*usb_iface_transfer_out_callback_t)(errno_t, void *); 117 117 118 118 /** Callback for incoming transfer. */ 119 typedef void (*usb_iface_transfer_in_callback_t)( int, size_t, void *);119 typedef void (*usb_iface_transfer_in_callback_t)(errno_t, size_t, void *); 120 120 121 121 /** USB device communication interface. */ 122 122 typedef struct { 123 int (*get_my_interface)(ddf_fun_t *, int *);124 int (*get_my_device_handle)(ddf_fun_t *, devman_handle_t *);123 errno_t (*get_my_interface)(ddf_fun_t *, int *); 124 errno_t (*get_my_device_handle)(ddf_fun_t *, devman_handle_t *); 125 125 126 int (*reserve_default_address)(ddf_fun_t *, usb_speed_t);127 int (*release_default_address)(ddf_fun_t *);126 errno_t (*reserve_default_address)(ddf_fun_t *, usb_speed_t); 127 errno_t (*release_default_address)(ddf_fun_t *); 128 128 129 int (*device_enumerate)(ddf_fun_t *, unsigned);130 int (*device_remove)(ddf_fun_t *, unsigned);129 errno_t (*device_enumerate)(ddf_fun_t *, unsigned); 130 errno_t (*device_remove)(ddf_fun_t *, unsigned); 131 131 132 int (*register_endpoint)(ddf_fun_t *, usb_endpoint_t,132 errno_t (*register_endpoint)(ddf_fun_t *, usb_endpoint_t, 133 133 usb_transfer_type_t, usb_direction_t, size_t, unsigned, unsigned); 134 int (*unregister_endpoint)(ddf_fun_t *, usb_endpoint_t,134 errno_t (*unregister_endpoint)(ddf_fun_t *, usb_endpoint_t, 135 135 usb_direction_t); 136 136 137 int (*read)(ddf_fun_t *, usb_endpoint_t, uint64_t, uint8_t *, size_t,137 errno_t (*read)(ddf_fun_t *, usb_endpoint_t, uint64_t, uint8_t *, size_t, 138 138 usb_iface_transfer_in_callback_t, void *); 139 int (*write)(ddf_fun_t *, usb_endpoint_t, uint64_t, const uint8_t *,139 errno_t (*write)(ddf_fun_t *, usb_endpoint_t, uint64_t, const uint8_t *, 140 140 size_t, usb_iface_transfer_out_callback_t, void *); 141 141 } usb_iface_t;
Note:
See TracChangeset
for help on using the changeset viewer.