Changeset b317b0b in mainline for uspace/lib/usb/include/usb/request.h
- Timestamp:
- 2011-02-21T19:50:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 15b0432
- Parents:
- ace12560 (diff), 41b70d30 (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/request.h
race12560 rb317b0b 41 41 #include <usb/descriptor.h> 42 42 43 /** Standard device request. */ 44 typedef enum { 45 USB_DEVREQ_GET_STATUS = 0, 46 USB_DEVREQ_CLEAR_FEATURE = 1, 47 USB_DEVREQ_SET_FEATURE = 3, 48 USB_DEVREQ_SET_ADDRESS = 5, 49 USB_DEVREQ_GET_DESCRIPTOR = 6, 50 USB_DEVREQ_SET_DESCRIPTOR = 7, 51 USB_DEVREQ_GET_CONFIGURATION = 8, 52 USB_DEVREQ_SET_CONFIGURATION = 9, 53 USB_DEVREQ_GET_INTERFACE = 10, 54 USB_DEVREQ_SET_INTERFACE = 11, 55 USB_DEVREQ_SYNCH_FRAME = 12, 56 USB_DEVREQ_LAST_STD 57 } usb_stddevreq_t; 58 59 /** Device request setup packet. 60 * The setup packet describes the request. 61 */ 62 typedef struct { 63 /** Request type. 64 * The type combines transfer direction, request type and 65 * intended recipient. 66 */ 67 uint8_t request_type; 68 /** Request identification. */ 69 uint8_t request; 70 /** Main parameter to the request. */ 71 union { 72 uint16_t value; 73 /* FIXME: add #ifdefs according to host endianess */ 74 struct { 75 uint8_t value_low; 76 uint8_t value_high; 77 }; 78 }; 79 /** Auxiliary parameter to the request. 80 * Typically, it is offset to something. 81 */ 82 uint16_t index; 83 /** Length of extra data. */ 84 uint16_t length; 85 } __attribute__ ((packed)) usb_device_request_setup_packet_t; 86 43 87 int usb_control_request_set(usb_endpoint_pipe_t *, 44 88 usb_request_type_t, usb_request_recipient_t, uint8_t,
Note:
See TracChangeset
for help on using the changeset viewer.