Changeset 2c202c5 in mainline for uspace/lib/usb/include/usb/dev.h
- Timestamp:
- 2011-12-11T15:17:43Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bd575647
- Parents:
- a045ab1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/dev.h
ra045ab1 r2c202c5 35 35 #define LIBUSB_DEV_H_ 36 36 37 #include <devman.h> 37 38 #include <usb/usb.h> 38 #include <devman.h> 39 #include <usb/hc.h> 40 41 42 /** Abstraction of a physical connection to the device. 43 * This type is an abstraction of the USB wire that connects the host and 44 * the function (device). 45 */ 46 typedef struct { 47 /** Connection to the host controller device is connected to. */ 48 usb_hc_connection_t *hc_connection; 49 /** Address of the device. */ 50 usb_address_t address; 51 } usb_device_connection_t; 52 53 int usb_device_connection_initialize(usb_device_connection_t *, 54 usb_hc_connection_t *, usb_address_t); 55 56 /** Initialize connection to USB device on default address. 57 * 58 * @param dev_connection Device connection structure to be initialized. 59 * @param hc_connection Initialized connection to host controller. 60 * @return Error code. 61 */ 62 static inline int usb_device_connection_initialize_on_default_address( 63 usb_device_connection_t *connection, usb_hc_connection_t *hc_conn) 64 { 65 return usb_device_connection_initialize(connection, hc_conn, 0); 66 } 39 67 40 68 usb_address_t usb_get_address_by_handle(devman_handle_t); 41 69 42 int usb_ find_hc(devman_handle_t, devman_handle_t *);70 int usb_get_hc_by_handle(devman_handle_t, devman_handle_t *); 43 71 44 72 int usb_resolve_device_handle(const char *, devman_handle_t *, usb_address_t *,
Note:
See TracChangeset
for help on using the changeset viewer.