Changeset 1b0b86e6 in mainline for uspace/lib
- Timestamp:
- 2011-03-13T22:02:44Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b7d8fd9
- Parents:
- 67f54965 (diff), deb4ba7 (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. - Location:
- uspace/lib/usb
- Files:
-
- 3 added
- 3 edited
-
Makefile (modified) (1 diff)
-
include/usb/devdrv.h (added)
-
include/usb/pipes.h (modified) (1 diff)
-
src/devdrv.c (added)
-
src/devpoll.c (added)
-
src/pipesinit.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/Makefile
r67f54965 r1b0b86e6 37 37 src/ddfiface.c \ 38 38 src/debug.c \ 39 src/devdrv.c \ 40 src/devpoll.c \ 39 41 src/dp.c \ 40 42 src/dump.c \ -
uspace/lib/usb/include/usb/pipes.h
r67f54965 r1b0b86e6 106 106 const usb_endpoint_description_t *description; 107 107 /** Interface number the endpoint must belong to (-1 for any). */ 108 constint interface_no;108 int interface_no; 109 109 /** Found descriptor fitting the description. */ 110 110 usb_standard_endpoint_descriptor_t *descriptor; -
uspace/lib/usb/src/pipesinit.c
r67f54965 r1b0b86e6 37 37 #include <usb/pipes.h> 38 38 #include <usb/dp.h> 39 #include <usb/request.h> 39 40 #include <errno.h> 40 41 #include <assert.h> … … 370 371 int rc = usb_endpoint_pipe_initialize(pipe, connection, 371 372 0, USB_TRANSFER_CONTROL, 8, USB_DIRECTION_BOTH); 372 373 if (rc != EOK) { 374 return rc; 375 } 376 rc = usb_endpoint_pipe_start_session(pipe); 377 if (rc != EOK) { 378 return rc; 379 } 380 381 uint8_t first[8]; 382 size_t size = 0; 383 rc = usb_control_request_get(pipe, USB_REQUEST_TYPE_STANDARD, 384 USB_REQUEST_RECIPIENT_DEVICE, USB_DEVREQ_GET_DESCRIPTOR, 1 << 8, 385 0, first, 8, &size); 386 usb_endpoint_pipe_end_session(pipe); 387 if (rc != EOK || size != 8) { 388 return rc; 389 } 390 391 pipe->max_packet_size = first[7]; 373 392 return rc; 374 393 }
Note:
See TracChangeset
for help on using the changeset viewer.
