Changes in uspace/lib/drv/include/usbhc_iface.h [b7d8fd9:357a302] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/include/usbhc_iface.h
rb7d8fd9 r357a302 38 38 #define LIBDRV_USBHC_IFACE_H_ 39 39 40 #include "d df/driver.h"40 #include "driver.h" 41 41 #include <usb/usb.h> 42 42 #include <bool.h> … … 167 167 IPC_M_USBHC_CONTROL_READ, 168 168 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 169 /* IPC_M_USB_ */ 192 170 } usbhc_iface_funcs_t; 193 171 194 172 /** Callback for outgoing transfer. */ 195 typedef void (*usbhc_iface_transfer_out_callback_t)(d df_fun_t *,173 typedef void (*usbhc_iface_transfer_out_callback_t)(device_t *, 196 174 int, void *); 197 175 198 176 /** Callback for incoming transfer. */ 199 typedef void (*usbhc_iface_transfer_in_callback_t)(d df_fun_t *,177 typedef void (*usbhc_iface_transfer_in_callback_t)(device_t *, 200 178 int, size_t, void *); 201 179 202 180 203 181 /** Out transfer processing function prototype. */ 204 typedef int (*usbhc_iface_transfer_out_t)(d df_fun_t *, usb_target_t, size_t,182 typedef int (*usbhc_iface_transfer_out_t)(device_t *, usb_target_t, size_t, 205 183 void *, size_t, 206 184 usbhc_iface_transfer_out_callback_t, void *); … … 210 188 211 189 /** In transfer processing function prototype. */ 212 typedef int (*usbhc_iface_transfer_in_t)(d df_fun_t *, usb_target_t, size_t,190 typedef int (*usbhc_iface_transfer_in_t)(device_t *, usb_target_t, size_t, 213 191 void *, size_t, 214 192 usbhc_iface_transfer_in_callback_t, void *); … … 216 194 /** USB host controller communication interface. */ 217 195 typedef struct { 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); 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); 228 201 229 202 usbhc_iface_transfer_out_t interrupt_out; … … 233 206 usbhc_iface_transfer_in_t bulk_in; 234 207 235 int (*control_write)(d df_fun_t *, usb_target_t,208 int (*control_write)(device_t *, usb_target_t, 236 209 size_t, 237 210 void *, size_t, void *, size_t, 238 211 usbhc_iface_transfer_out_callback_t, void *); 239 212 240 int (*control_read)(d df_fun_t *, usb_target_t,213 int (*control_read)(device_t *, usb_target_t, 241 214 size_t, 242 215 void *, size_t, void *, size_t,
Note:
See TracChangeset
for help on using the changeset viewer.