Changeset c0587d90 in mainline for uspace/drv/bus/usb/usbhub/port.h


Ignore:
Timestamp:
2011-09-23T13:44:12Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
442fa6b
Parents:
a590a23
Message:

usbhub: Add pipe and port number to port structure.

Use these fields in feature set/clear.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhub/port.h

    ra590a23 rc0587d90  
    4444/** Information about single port on a hub. */
    4545typedef struct {
     46        size_t port_number;
     47        usb_pipe_t *control_pipe;
    4648        /** Mutex needed by CV for checking port reset. */
    4749        fibril_mutex_t reset_mutex;
     
    6365 * @param port Port to be initialized.
    6466 */
    65 static inline void usb_hub_port_init(usb_hub_port_t *port)
     67static inline void usb_hub_port_init(usb_hub_port_t *port, size_t port_number,
     68    usb_pipe_t *control_pipe)
    6669{
    6770        assert(port);
    6871        port->attached_device.address = -1;
    6972        port->attached_device.handle = 0;
     73        port->port_number = port_number;
     74        port->control_pipe = control_pipe;
    7075        fibril_mutex_initialize(&port->reset_mutex);
    7176        fibril_condvar_initialize(&port->reset_cv);
     
    7479
    7580void usb_hub_process_port_interrupt(usb_hub_info_t *hub, size_t port);
    76 int usb_hub_clear_port_feature(usb_pipe_t *pipe,
    77     int port_index, usb_hub_class_feature_t feature);
    78 int usb_hub_set_port_feature(usb_pipe_t *pipe,
    79     int port_index, usb_hub_class_feature_t feature);
     81int usb_hub_clear_port_feature(
     82    usb_hub_port_t *port, usb_hub_class_feature_t feature);
     83int usb_hub_set_port_feature(
     84    usb_hub_port_t *port, usb_hub_class_feature_t feature);
    8085
    8186
Note: See TracChangeset for help on using the changeset viewer.