Changeset 92574f4 in mainline for uspace/lib/usb/include/usb/request.h
- Timestamp:
- 2011-02-24T12:03:27Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e7b7ebd5
- Parents:
- 4837092 (diff), a80849c (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
r4837092 r92574f4 37 37 38 38 #include <sys/types.h> 39 #include <l18n/langs.h> 39 40 #include <usb/usb.h> 40 41 #include <usb/pipes.h> 41 42 #include <usb/descriptor.h> 43 44 /** Standard device request. */ 45 typedef enum { 46 USB_DEVREQ_GET_STATUS = 0, 47 USB_DEVREQ_CLEAR_FEATURE = 1, 48 USB_DEVREQ_SET_FEATURE = 3, 49 USB_DEVREQ_SET_ADDRESS = 5, 50 USB_DEVREQ_GET_DESCRIPTOR = 6, 51 USB_DEVREQ_SET_DESCRIPTOR = 7, 52 USB_DEVREQ_GET_CONFIGURATION = 8, 53 USB_DEVREQ_SET_CONFIGURATION = 9, 54 USB_DEVREQ_GET_INTERFACE = 10, 55 USB_DEVREQ_SET_INTERFACE = 11, 56 USB_DEVREQ_SYNCH_FRAME = 12, 57 USB_DEVREQ_LAST_STD 58 } usb_stddevreq_t; 59 60 /** Device request setup packet. 61 * The setup packet describes the request. 62 */ 63 typedef struct { 64 /** Request type. 65 * The type combines transfer direction, request type and 66 * intended recipient. 67 */ 68 uint8_t request_type; 69 /** Request identification. */ 70 uint8_t request; 71 /** Main parameter to the request. */ 72 union { 73 uint16_t value; 74 /* FIXME: add #ifdefs according to host endianess */ 75 struct { 76 uint8_t value_low; 77 uint8_t value_high; 78 }; 79 }; 80 /** Auxiliary parameter to the request. 81 * Typically, it is offset to something. 82 */ 83 uint16_t index; 84 /** Length of extra data. */ 85 uint16_t length; 86 } __attribute__ ((packed)) usb_device_request_setup_packet_t; 42 87 43 88 int usb_control_request_set(usb_endpoint_pipe_t *, … … 52 97 int usb_request_get_descriptor(usb_endpoint_pipe_t *, usb_request_type_t, 53 98 uint8_t, uint8_t, uint16_t, void *, size_t, size_t *); 99 int usb_request_get_descriptor_alloc(usb_endpoint_pipe_t *, usb_request_type_t, 100 uint8_t, uint8_t, uint16_t, void **, size_t *); 54 101 int usb_request_get_device_descriptor(usb_endpoint_pipe_t *, 55 102 usb_standard_device_descriptor_t *); … … 60 107 int usb_request_set_configuration(usb_endpoint_pipe_t *, uint8_t); 61 108 109 int usb_request_get_supported_languages(usb_endpoint_pipe_t *, 110 l18_win_locales_t **, size_t *); 111 int usb_request_get_string(usb_endpoint_pipe_t *, size_t, l18_win_locales_t, 112 char **); 113 62 114 #endif 63 115 /**
Note:
See TracChangeset
for help on using the changeset viewer.