Changeset 30ec5ea in mainline
- Timestamp:
- 2011-12-12T15:30:03Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c59dbdd5
- Parents:
- 3538b0e
- Location:
- uspace/lib/usb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/hc.h
r3538b0e r30ec5ea 31 31 */ 32 32 /** @file 33 * General communication with host controller driver.33 * General communication with host controller. 34 34 */ 35 35 #ifndef LIBUSB_HC_H_ … … 42 42 #include <usb/usb.h> 43 43 44 /** Connection to the host controller driver. */ 44 /** Connection to the host controller driver. 45 * 46 * This is a high level IPC communication wrapper. After the structure has been 47 * initialized using devman handle of an USB host controller, it 48 * will manage all communication to that host controller, including session 49 * creation/destruction and proper IPC protocol. 50 */ 45 51 typedef struct { 46 52 /** Devman handle of the host controller. */ … … 88 94 usb_endpoint_t, usb_direction_t); 89 95 90 int usb_hc_ control_read(usb_hc_connection_t *, usb_address_t, usb_endpoint_t,96 int usb_hc_read(usb_hc_connection_t *, usb_address_t, usb_endpoint_t, 91 97 uint64_t, void *, size_t, size_t *); 92 int usb_hc_ control_write(usb_hc_connection_t *, usb_address_t, usb_endpoint_t,98 int usb_hc_write(usb_hc_connection_t *, usb_address_t, usb_endpoint_t, 93 99 uint64_t, const void *, size_t); 94 100 -
uspace/lib/usb/src/hc.c
r3538b0e r30ec5ea 64 64 assert(connection); 65 65 fibril_mutex_lock(&connection->guard); 66 if (connection->ref_count == 0) { 67 /* Closing already closed connection... */ 68 assert(connection->hc_sess = NULL); 69 fibril_mutex_unlock(&connection->guard); 70 return EOK; 71 } 66 72 --connection->ref_count; 67 73 int ret = EOK; … … 232 238 } 233 239 /*----------------------------------------------------------------------------*/ 234 int usb_hc_ control_read(usb_hc_connection_t *connection, usb_address_t address,240 int usb_hc_read(usb_hc_connection_t *connection, usb_address_t address, 235 241 usb_endpoint_t endpoint, uint64_t setup, void *data, size_t size, 236 242 size_t *real_size) … … 246 252 } 247 253 /*----------------------------------------------------------------------------*/ 248 int usb_hc_ control_write(usb_hc_connection_t *connection, usb_address_t address,254 int usb_hc_write(usb_hc_connection_t *connection, usb_address_t address, 249 255 usb_endpoint_t endpoint, uint64_t setup, const void *data, size_t size) 250 256 {
Note:
See TracChangeset
for help on using the changeset viewer.