Changeset 5e07cbc0 in mainline for uspace/lib/usbhost/src/usb_device_manager.c
- Timestamp:
- 2011-10-31T13:39:22Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0cd8089
- Parents:
- 27ed734c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/usb_device_manager.c
r27ed734c r5e07cbc0 41 41 * 42 42 * @param[in] instance Memory place to initialize. 43 * @param[in] max_speed Maximum allowed USB speed of devices (inclusive). 43 44 * 44 45 * Set all values to false/0. 45 46 */ 46 void usb_device_manager_init(usb_device_manager_t *instance) 47 void usb_device_manager_init( 48 usb_device_manager_t *instance, usb_speed_t max_speed) 47 49 { 48 50 assert(instance); … … 56 58 instance->devices[0].occupied = true; 57 59 instance->last_address = 0; 60 instance->max_speed = max_speed; 58 61 fibril_mutex_initialize(&instance->guard); 59 62 } … … 69 72 { 70 73 assert(instance); 74 if (speed > instance->max_speed) 75 return ENOTSUP; 71 76 fibril_mutex_lock(&instance->guard); 72 77
Note:
See TracChangeset
for help on using the changeset viewer.