Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/include/usbhc_iface.h

    r46e078a rb7d8fd9  
    6666 *   - argument #1 is target address
    6767 *   - argument #2 is target endpoint
     68 *   - argument #3 is max packet size of the endpoint
    6869 * - this call is immediately followed by IPC data read (async version)
    6970 * - the call is not answered until the device returns some data (or until
     
    8485 */
    8586typedef enum {
     87        /** Reserve usage of default address.
     88         * This call informs the host controller that the caller will be
     89         * using default USB address. It is duty of the HC driver to ensure
     90         * that only single entity will have it reserved.
     91         * The address is returned via IPC_M_USBHC_RELEASE_DEFAULT_ADDRESS.
     92         * The caller can start using the address after receiving EOK
     93         * answer.
     94         */
     95        IPC_M_USBHC_RESERVE_DEFAULT_ADDRESS,
     96
     97        /** Release usage of default address.
     98         * @see IPC_M_USBHC_RESERVE_DEFAULT_ADDRESS
     99         */
     100        IPC_M_USBHC_RELEASE_DEFAULT_ADDRESS,
     101
    86102        /** Asks for address assignment by host controller.
    87103         * Answer:
     
    153169        /** Register endpoint attributes at host controller.
    154170         * This is used to reserve portion of USB bandwidth.
    155          * When speed is invalid, speed of the device is used.
    156171         * Parameters:
    157          * - USB address + endpoint number
    158          *   - packed as ADDR << 16 + EP
    159          * - speed + transfer type + direction
    160          *   - packed as ( SPEED << 8 + TYPE ) << 8 + DIR
    161          * - maximum packet size + interval (in milliseconds)
    162          *   - packed as MPS << 16 + INT
     172         * - USB address + endpoint number (ADDR * 256 + EP)
     173         * - transfer type + direction (TYPE * 256 + DIR)
     174         * - maximum packet size
     175         * - interval (in milliseconds)
    163176         * Answer:
    164177         * - EOK - reservation successful
     
    189202
    190203/** Out transfer processing function prototype. */
    191 typedef int (*usbhc_iface_transfer_out_t)(ddf_fun_t *, usb_target_t,
     204typedef int (*usbhc_iface_transfer_out_t)(ddf_fun_t *, usb_target_t, size_t,
    192205    void *, size_t,
    193206    usbhc_iface_transfer_out_callback_t, void *);
     
    197210
    198211/** In transfer processing function prototype. */
    199 typedef int (*usbhc_iface_transfer_in_t)(ddf_fun_t *, usb_target_t,
     212typedef int (*usbhc_iface_transfer_in_t)(ddf_fun_t *, usb_target_t, size_t,
    200213    void *, size_t,
    201214    usbhc_iface_transfer_in_callback_t, void *);
     
    209222        int (*release_address)(ddf_fun_t *, usb_address_t);
    210223
    211         int (*register_endpoint)(ddf_fun_t *,
    212             usb_address_t, usb_speed_t, usb_endpoint_t,
     224        int (*register_endpoint)(ddf_fun_t *, usb_address_t, usb_endpoint_t,
    213225            usb_transfer_type_t, usb_direction_t, size_t, unsigned int);
    214226        int (*unregister_endpoint)(ddf_fun_t *, usb_address_t, usb_endpoint_t,
     
    222234
    223235        int (*control_write)(ddf_fun_t *, usb_target_t,
     236            size_t,
    224237            void *, size_t, void *, size_t,
    225238            usbhc_iface_transfer_out_callback_t, void *);
    226239
    227240        int (*control_read)(ddf_fun_t *, usb_target_t,
     241            size_t,
    228242            void *, size_t, void *, size_t,
    229243            usbhc_iface_transfer_in_callback_t, void *);
Note: See TracChangeset for help on using the changeset viewer.