Changes in uspace/lib/drv/include/usbhc_iface.h [4689d40:cb59f787] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/include/usbhc_iface.h
r4689d40 rcb59f787 92 92 */ 93 93 typedef enum { 94 /** Tell USB address assigned to device.95 * Parameters:96 * - devman handle id97 * Answer:98 * - EINVAL - unknown handle or handle not managed by this driver99 * - ENOTSUP - operation not supported by HC (shall not happen)100 * - arbitrary error code if returned by remote implementation101 * - EOK - handle found, first parameter contains the USB address102 */103 IPC_M_USBHC_GET_ADDRESS,104 105 94 /** Asks for data buffer. 106 95 * See explanation at usb_iface_funcs_t. … … 109 98 */ 110 99 IPC_M_USBHC_GET_BUFFER, 111 112 113 /** Reserve usage of default address.114 * This call informs the host controller that the caller will be115 * using default USB address. It is duty of the HC driver to ensure116 * that only single entity will have it reserved.117 * The address is returned via IPC_M_USBHC_RELEASE_DEFAULT_ADDRESS.118 * The caller can start using the address after receiving EOK119 * answer.120 */121 IPC_M_USBHC_RESERVE_DEFAULT_ADDRESS,122 123 /** Release usage of default address.124 * @see IPC_M_USBHC_RESERVE_DEFAULT_ADDRESS125 */126 IPC_M_USBHC_RELEASE_DEFAULT_ADDRESS,127 128 /** Asks for address assignment by host controller.129 * Answer:130 * - ELIMIT - host controller run out of address131 * - EOK - address assigned132 * Answer arguments:133 * - assigned address134 *135 * The address must be released by via IPC_M_USBHC_RELEASE_ADDRESS.136 */137 IPC_M_USBHC_REQUEST_ADDRESS,138 139 /** Bind USB address with devman handle.140 * Parameters:141 * - USB address142 * - devman handle143 * Answer:144 * - EOK - address binded145 * - ENOENT - address is not in use146 */147 IPC_M_USBHC_BIND_ADDRESS,148 149 /** Release address in use.150 * Arguments:151 * - address to be released152 * Answer:153 * - ENOENT - address not in use154 * - EPERM - trying to release default USB address155 */156 IPC_M_USBHC_RELEASE_ADDRESS,157 100 158 101 … … 212 155 usb_transaction_outcome_t, size_t, void *); 213 156 214 215 /** Out transfer processing function prototype. */216 typedef int (*usbhc_iface_transfer_out_t)(device_t *, usb_target_t,217 void *, size_t,218 usbhc_iface_transfer_out_callback_t, void *);219 220 /** Setup transfer processing function prototype. */221 typedef usbhc_iface_transfer_out_t usbhc_iface_transfer_setup_t;222 223 /** In transfer processing function prototype. */224 typedef int (*usbhc_iface_transfer_in_t)(device_t *, usb_target_t,225 void *, size_t,226 usbhc_iface_transfer_in_callback_t, void *);227 228 157 /** USB devices communication interface. */ 229 158 typedef struct { 230 int (*tell_address)(device_t *, devman_handle_t, usb_address_t *); 231 232 int (*reserve_default_address)(device_t *); 233 int (*release_default_address)(device_t *); 234 int (*request_address)(device_t *, usb_address_t *); 235 int (*bind_address)(device_t *, usb_address_t, devman_handle_t); 236 int (*release_address)(device_t *, usb_address_t); 237 238 usbhc_iface_transfer_out_t interrupt_out; 239 usbhc_iface_transfer_in_t interrupt_in; 240 241 usbhc_iface_transfer_setup_t control_write_setup; 242 usbhc_iface_transfer_out_t control_write_data; 243 int (*control_write_status)(device_t *, usb_target_t, 159 int (*interrupt_out)(device_t *, usb_target_t, 160 void *, size_t, 161 usbhc_iface_transfer_out_callback_t, void *); 162 int (*interrupt_in)(device_t *, usb_target_t, 163 void *, size_t, 244 164 usbhc_iface_transfer_in_callback_t, void *); 245 246 usbhc_iface_transfer_setup_t control_read_setup;247 usbhc_iface_transfer_in_t control_read_data;248 int (*control_read_status)(device_t *, usb_target_t,249 usbhc_iface_transfer_out_callback_t, void *);250 165 } usbhc_iface_t; 251 166
Note:
See TracChangeset
for help on using the changeset viewer.