Changeset 1e1b1a9 in mainline for uspace/drv/usbhub/usbhub.h
- Timestamp:
- 2011-04-09T15:06:34Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f35b294
- Parents:
- 8961c22
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/usbhub.h
r8961c22 r1e1b1a9 37 37 38 38 #include <ipc/devman.h> 39 #include <usb/usb.h>40 39 #include <ddf/driver.h> 41 42 #define NAME "usbhub"43 40 44 41 #include <usb/hub.h> … … 50 47 #include <fibril_synch.h> 51 48 49 #define NAME "usbhub" 52 50 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; 51 #include "ports.h" 63 52 64 /** Information about attached device. */65 usb_hc_attached_device_t attached_device;66 } usb_hub_port_t;67 53 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 54 79 55 /** Information about attached hub. */ 80 typedef struct {56 typedef struct usb_hub_info_t{ 81 57 /** Number of ports. */ 82 58 size_t port_count; … … 119 95 int usb_hub_add_device(usb_device_t * usb_dev); 120 96 121 int usb_hub_check_hub_changes(usb_hub_info_t * hub_info_param);122 123 97 bool hub_port_changes_callback(usb_device_t *dev, 124 98 uint8_t *change_bitmap, size_t change_bitmap_size, void *arg); 99 100 int usb_hub_release_default_address(usb_hub_info_t * hub); 101 125 102 #endif 126 103 /**
Note:
See TracChangeset
for help on using the changeset viewer.