Changes in uspace/lib/drv/include/usbhc_iface.h [357a302:b7d8fd9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/include/usbhc_iface.h
r357a302 rb7d8fd9 38 38 #define LIBDRV_USBHC_IFACE_H_ 39 39 40 #include "d river.h"40 #include "ddf/driver.h" 41 41 #include <usb/usb.h> 42 42 #include <bool.h> … … 167 167 IPC_M_USBHC_CONTROL_READ, 168 168 169 /* IPC_M_USB_ */ 169 /** Register endpoint attributes at host controller. 170 * This is used to reserve portion of USB bandwidth. 171 * Parameters: 172 * - USB address + endpoint number (ADDR * 256 + EP) 173 * - transfer type + direction (TYPE * 256 + DIR) 174 * - maximum packet size 175 * - interval (in milliseconds) 176 * Answer: 177 * - EOK - reservation successful 178 * - ELIMIT - not enough bandwidth to satisfy the request 179 */ 180 IPC_M_USBHC_REGISTER_ENDPOINT, 181 182 /** Revert endpoint registration. 183 * Parameters: 184 * - USB address 185 * - endpoint number 186 * - data direction 187 * Answer: 188 * - EOK - endpoint unregistered 189 * - ENOENT - unknown endpoint 190 */ 191 IPC_M_USBHC_UNREGISTER_ENDPOINT 170 192 } usbhc_iface_funcs_t; 171 193 172 194 /** Callback for outgoing transfer. */ 173 typedef void (*usbhc_iface_transfer_out_callback_t)(d evice_t *,195 typedef void (*usbhc_iface_transfer_out_callback_t)(ddf_fun_t *, 174 196 int, void *); 175 197 176 198 /** Callback for incoming transfer. */ 177 typedef void (*usbhc_iface_transfer_in_callback_t)(d evice_t *,199 typedef void (*usbhc_iface_transfer_in_callback_t)(ddf_fun_t *, 178 200 int, size_t, void *); 179 201 180 202 181 203 /** Out transfer processing function prototype. */ 182 typedef int (*usbhc_iface_transfer_out_t)(d evice_t *, usb_target_t, size_t,204 typedef int (*usbhc_iface_transfer_out_t)(ddf_fun_t *, usb_target_t, size_t, 183 205 void *, size_t, 184 206 usbhc_iface_transfer_out_callback_t, void *); … … 188 210 189 211 /** In transfer processing function prototype. */ 190 typedef int (*usbhc_iface_transfer_in_t)(d evice_t *, usb_target_t, size_t,212 typedef int (*usbhc_iface_transfer_in_t)(ddf_fun_t *, usb_target_t, size_t, 191 213 void *, size_t, 192 214 usbhc_iface_transfer_in_callback_t, void *); … … 194 216 /** USB host controller communication interface. */ 195 217 typedef struct { 196 int (*reserve_default_address)(device_t *, usb_speed_t); 197 int (*release_default_address)(device_t *); 198 int (*request_address)(device_t *, usb_speed_t, usb_address_t *); 199 int (*bind_address)(device_t *, usb_address_t, devman_handle_t); 200 int (*release_address)(device_t *, usb_address_t); 218 int (*reserve_default_address)(ddf_fun_t *, usb_speed_t); 219 int (*release_default_address)(ddf_fun_t *); 220 int (*request_address)(ddf_fun_t *, usb_speed_t, usb_address_t *); 221 int (*bind_address)(ddf_fun_t *, usb_address_t, devman_handle_t); 222 int (*release_address)(ddf_fun_t *, usb_address_t); 223 224 int (*register_endpoint)(ddf_fun_t *, usb_address_t, usb_endpoint_t, 225 usb_transfer_type_t, usb_direction_t, size_t, unsigned int); 226 int (*unregister_endpoint)(ddf_fun_t *, usb_address_t, usb_endpoint_t, 227 usb_direction_t); 201 228 202 229 usbhc_iface_transfer_out_t interrupt_out; … … 206 233 usbhc_iface_transfer_in_t bulk_in; 207 234 208 int (*control_write)(d evice_t *, usb_target_t,235 int (*control_write)(ddf_fun_t *, usb_target_t, 209 236 size_t, 210 237 void *, size_t, void *, size_t, 211 238 usbhc_iface_transfer_out_callback_t, void *); 212 239 213 int (*control_read)(d evice_t *, usb_target_t,240 int (*control_read)(ddf_fun_t *, usb_target_t, 214 241 size_t, 215 242 void *, size_t, void *, size_t,
Note:
See TracChangeset
for help on using the changeset viewer.