Changeset e50cd7f in mainline for uspace/lib/usb/include/usb/pipes.h
- Timestamp:
- 2011-04-17T19:17:55Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63517c2, cfbbe1d3
- Parents:
- ef354b6 (diff), 8595577b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/pipes.h
ref354b6 re50cd7f 42 42 #include <ipc/devman.h> 43 43 #include <ddf/driver.h> 44 #include <fibril_synch.h> 44 45 45 46 /** Abstraction of a physical connection to the device. … … 59 60 * This endpoint must be bound with existing usb_device_connection_t 60 61 * (i.e. the wire to send data over). 62 * 63 * Locking order: if you want to lock both mutexes 64 * (@c guard and @c hc_phone_mutex), lock @c guard first. 65 * It is not necessary to lock @c guard if you want to lock @c hc_phone_mutex 66 * only. 61 67 */ 62 68 typedef struct { 69 /** Guard of the whole pipe. */ 70 fibril_mutex_t guard; 71 63 72 /** The connection used for sending the data. */ 64 73 usb_device_connection_t *wire; … … 78 87 /** Phone to the host controller. 79 88 * Negative when no session is active. 89 * It is an error to access this member without @c hc_phone_mutex 90 * being locked. 91 * If call over the phone is to be made, it must be preceeded by 92 * call to pipe_add_ref() [internal libusb function]. 80 93 */ 81 94 int hc_phone; 95 96 /** Guard for serialization of requests over the phone. */ 97 fibril_mutex_t hc_phone_mutex; 98 99 /** Number of active transfers over the pipe. */ 100 int refcount; 101 102 /** Whether to automatically reset halt on the endpoint. 103 * Valid only for control endpoint zero. 104 */ 105 bool auto_reset_halt; 82 106 } usb_pipe_t; 83 107 … … 134 158 int usb_pipe_initialize_from_configuration(usb_endpoint_mapping_t *, 135 159 size_t, uint8_t *, size_t, usb_device_connection_t *); 160 int usb_pipe_register_with_speed(usb_pipe_t *, usb_speed_t, 161 unsigned int, usb_hc_connection_t *); 136 162 int usb_pipe_register(usb_pipe_t *, unsigned int, usb_hc_connection_t *); 137 163 int usb_pipe_unregister(usb_pipe_t *, usb_hc_connection_t *); … … 140 166 int usb_pipe_end_session(usb_pipe_t *); 141 167 bool usb_pipe_is_session_started(usb_pipe_t *); 168 169 int usb_pipe_start_long_transfer(usb_pipe_t *); 170 void usb_pipe_end_long_transfer(usb_pipe_t *); 142 171 143 172 int usb_pipe_read(usb_pipe_t *, void *, size_t, size_t *);
Note:
See TracChangeset
for help on using the changeset viewer.