Changeset 88dd355 in mainline
- Timestamp:
- 2011-04-06T19:29:33Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fb8927d
- Parents:
- 5876d36
- Location:
- uspace/lib/usb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/host/device_keeper.h
r5876d36 r88dd355 40 40 #ifndef LIBUSB_HOST_DEVICE_KEEPER_H 41 41 #define LIBUSB_HOST_DEVICE_KEEPER_H 42 43 #include <adt/list.h> 42 44 #include <devman.h> 43 45 #include <fibril_synch.h> … … 51 53 usb_speed_t speed; 52 54 bool occupied; 55 link_t endpoints; 53 56 uint16_t control_used; 54 57 uint16_t toggle_status[2]; … … 68 71 void usb_device_keeper_init(usb_device_keeper_t *instance); 69 72 70 void usb_device_keeper_reserve_default_address(usb_device_keeper_t *instance, 71 usb_speed_t speed); 73 void usb_device_keeper_add_ep( 74 usb_device_keeper_t *instance, usb_address_t address, link_t *ep); 75 76 void usb_device_keeper_reserve_default_address( 77 usb_device_keeper_t *instance, usb_speed_t speed); 72 78 73 79 void usb_device_keeper_release_default_address(usb_device_keeper_t *instance); -
uspace/lib/usb/src/host/device_keeper.c
r5876d36 r88dd355 58 58 instance->devices[i].toggle_status[0] = 0; 59 59 instance->devices[i].toggle_status[1] = 0; 60 } 61 } 60 list_initialize(&instance->devices[i].endpoints); 61 } 62 } 63 /*----------------------------------------------------------------------------*/ 64 void usb_device_keeper_add_ep( 65 usb_device_keeper_t *instance, usb_address_t address, link_t *ep); 62 66 /*----------------------------------------------------------------------------*/ 63 67 /** Attempt to obtain address 0, blocks. … … 66 70 * @param[in] speed Speed of the device requesting default address. 67 71 */ 68 void usb_device_keeper_reserve_default_address( usb_device_keeper_t *instance,69 usb_ speed_t speed)72 void usb_device_keeper_reserve_default_address( 73 usb_device_keeper_t *instance, usb_speed_t speed) 70 74 { 71 75 assert(instance); … … 101 105 * Really ugly one. 102 106 */ 103 void usb_device_keeper_reset_if_need( usb_device_keeper_t *instance,104 usb_ target_t target, const uint8_t *data)107 void usb_device_keeper_reset_if_need( 108 usb_device_keeper_t *instance, usb_target_t target, const uint8_t *data) 105 109 { 106 110 assert(instance); … … 208 212 * @return Free address, or error code. 209 213 */ 210 usb_address_t device_keeper_get_free_address( usb_device_keeper_t *instance,211 usb_ speed_t speed)214 usb_address_t device_keeper_get_free_address( 215 usb_device_keeper_t *instance, usb_speed_t speed) 212 216 { 213 217 assert(instance); … … 259 263 * @param[in] address Device address 260 264 */ 261 void usb_device_keeper_release( usb_device_keeper_t *instance,262 usb_ address_t address)265 void usb_device_keeper_release( 266 usb_device_keeper_t *instance, usb_address_t address) 263 267 { 264 268 assert(instance); … … 278 282 * @return USB Address, or error code. 279 283 */ 280 usb_address_t usb_device_keeper_find( usb_device_keeper_t *instance,281 devman_handle_t handle)284 usb_address_t usb_device_keeper_find( 285 usb_device_keeper_t *instance, devman_handle_t handle) 282 286 { 283 287 assert(instance); … … 301 305 * @return USB speed. 302 306 */ 303 usb_speed_t usb_device_keeper_get_speed( usb_device_keeper_t *instance,304 usb_ address_t address)307 usb_speed_t usb_device_keeper_get_speed( 308 usb_device_keeper_t *instance, usb_address_t address) 305 309 { 306 310 assert(instance); … … 310 314 } 311 315 /*----------------------------------------------------------------------------*/ 312 void usb_device_keeper_use_control( usb_device_keeper_t *instance,313 usb_ target_t target)316 void usb_device_keeper_use_control( 317 usb_device_keeper_t *instance, usb_target_t target) 314 318 { 315 319 assert(instance); … … 323 327 } 324 328 /*----------------------------------------------------------------------------*/ 325 void usb_device_keeper_release_control( usb_device_keeper_t *instance,326 usb_ target_t target)329 void usb_device_keeper_release_control( 330 usb_device_keeper_t *instance, usb_target_t target) 327 331 { 328 332 assert(instance);
Note:
See TracChangeset
for help on using the changeset viewer.