Changes in uspace/drv/usbhub/usbhub.h [3e490eb:578a2547] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/usbhub.h
r3e490eb r578a2547 43 43 44 44 #include <usb/hub.h> 45 #include <usb/classes/hub.h>46 45 47 46 #include <usb/pipes.h> 48 47 #include <usb/devdrv.h> 49 48 50 #include <fibril_synch.h>49 #include "ports.h" 51 50 52 51 53 /** Information about single port on a hub. */54 typedef struct {55 /** Mutex needed by CV for checking port reset. */56 fibril_mutex_t reset_mutex;57 /** CV for waiting to port reset completion. */58 fibril_condvar_t reset_cv;59 /** Whether port reset is completed.60 * Guarded by @c reset_mutex.61 */62 bool reset_completed;63 64 /** Information about attached device. */65 usb_hc_attached_device_t attached_device;66 } usb_hub_port_t;67 68 /** Initialize hub port information.69 *70 * @param port Port to be initialized.71 */72 static inline void usb_hub_port_init(usb_hub_port_t *port) {73 port->attached_device.address = -1;74 port->attached_device.handle = 0;75 fibril_mutex_initialize(&port->reset_mutex);76 fibril_condvar_initialize(&port->reset_cv);77 }78 52 79 53 /** Information about attached hub. */ … … 82 56 size_t port_count; 83 57 84 /** attached device handles, for each port one*/58 /** Ports. */ 85 59 usb_hub_port_t *ports; 86 60 87 61 /** connection to hcd */ 88 62 usb_hc_connection_t connection; … … 115 89 } usb_hub_info_t; 116 90 117 //int usb_hub_control_loop(void * hub_info_param); 91 /** 92 * function running the hub-controlling loop. 93 * @param hub_info_param hub info pointer 94 */ 95 int usb_hub_control_loop(void * hub_info_param); 96 97 /** 98 * Check changes on specified hub 99 * @param hub_info_param pointer to usb_hub_info_t structure 100 * @return error code if there is problem when initializing communication with 101 * hub, EOK otherwise 102 */ 103 int usb_hub_check_hub_changes(usb_hub_info_t * hub_info_param); 104 105 void usb_hub_removed_device(usb_hub_info_t *, uint16_t); 106 void usb_hub_over_current(usb_hub_info_t *, uint16_t); 118 107 119 108 int usb_hub_add_device(usb_device_t * usb_dev); 120 109 121 int usb_hub_check_hub_changes(usb_hub_info_t * hub_info_param);122 123 bool hub_port_changes_callback(usb_device_t *dev,124 uint8_t *change_bitmap, size_t change_bitmap_size, void *arg);125 110 #endif 126 111 /**
Note:
See TracChangeset
for help on using the changeset viewer.