Changeset 4e732f1a in mainline for uspace/lib/usbdev
- Timestamp:
- 2014-01-24T02:10:16Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 42de21a
- Parents:
- 3de7a62
- Location:
- uspace/lib/usbdev
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/include/usb/dev/pipes.h
r3de7a62 r4e732f1a 61 61 size_t max_packet_size; 62 62 63 /** Number of packets per frame/uframe. 64 * Only valid for HS INT and ISO transfers. All others should set to 1*/ 65 unsigned packets; 66 63 67 /** Whether to automatically reset halt on the endpoint. 64 68 * Valid only for control endpoint zero. … … 105 109 106 110 int usb_pipe_initialize(usb_pipe_t *, usb_endpoint_t, usb_transfer_type_t, 107 size_t, usb_direction_t, u sb_dev_session_t *);111 size_t, usb_direction_t, unsigned, usb_dev_session_t *); 108 112 int usb_pipe_initialize_default_control(usb_pipe_t *, usb_dev_session_t *); 109 113 -
uspace/lib/usbdev/src/pipes.c
r3de7a62 r4e732f1a 254 254 int usb_pipe_initialize(usb_pipe_t *pipe, usb_endpoint_t endpoint_no, 255 255 usb_transfer_type_t transfer_type, size_t max_packet_size, 256 usb_direction_t direction, u sb_dev_session_t *bus_session)256 usb_direction_t direction, unsigned packets, usb_dev_session_t *bus_session) 257 257 { 258 258 assert(pipe); … … 260 260 pipe->endpoint_no = endpoint_no; 261 261 pipe->transfer_type = transfer_type; 262 pipe->packets = packets; 262 263 pipe->max_packet_size = max_packet_size; 263 264 pipe->direction = direction; … … 279 280 280 281 const int rc = usb_pipe_initialize(pipe, 0, USB_TRANSFER_CONTROL, 281 CTRL_PIPE_MIN_PACKET_SIZE, USB_DIRECTION_BOTH, bus_session);282 CTRL_PIPE_MIN_PACKET_SIZE, USB_DIRECTION_BOTH, 1, bus_session); 282 283 283 284 pipe->auto_reset_halt = true; … … 301 302 const int ret = usb_register_endpoint(exch, pipe->endpoint_no, 302 303 pipe->transfer_type, pipe->direction, pipe->max_packet_size, 303 interval);304 pipe->packets, interval); 304 305 async_exchange_end(exch); 305 306 return ret; -
uspace/lib/usbdev/src/pipesinit.c
r3de7a62 r4e732f1a 196 196 int rc = usb_pipe_initialize(&ep_mapping->pipe, 197 197 ep_no, description.transfer_type, 198 uint16_usb2host(endpoint_desc->max_packet_size), 199 description.direction, bus_session); 198 ED_MPS_PACKET_SIZE_GET( 199 uint16_usb2host(endpoint_desc->max_packet_size)), 200 description.direction, 201 ED_MPS_TRANS_OPPORTUNITIES_GET( 202 uint16_usb2host(endpoint_desc->max_packet_size)), bus_session); 200 203 if (rc != EOK) { 201 204 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.