Changeset ca07cd3 in mainline for uspace/lib/usbvirt/stdreq.c
- Timestamp:
- 2010-10-25T13:23:33Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 23cb44b
- Parents:
- 355f7c2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbvirt/stdreq.c
r355f7c2 rca07cd3 49 49 */ 50 50 51 static int handle_get_descriptor(uint8_t type, uint8_t index, uint16_t language, 51 /** GET_DESCRIPTOR handler. */ 52 static int handle_get_descriptor(usbvirt_device_t *device, 53 uint8_t type, uint8_t index, uint16_t language, 52 54 uint16_t length) 53 55 { … … 106 108 } 107 109 108 static int handle_set_address(uint16_t new_address, 110 /** SET_ADDRESS handler. */ 111 static int handle_set_address(usbvirt_device_t *device, 112 uint16_t new_address, 109 113 uint16_t zero1, uint16_t zero2) 110 114 { … … 117 121 } 118 122 119 dev _new_address = new_address;123 device->new_address = new_address; 120 124 121 125 return EOK; 122 126 } 123 127 124 static int handle_set_configuration(uint16_t configuration_value, 128 /** SET_CONFIGURATION handler. */ 129 static int handle_set_configuration(usbvirt_device_t *device, 130 uint16_t configuration_value, 125 131 uint16_t zero1, uint16_t zero2) 126 132 { … … 177 183 } while (false) 178 184 179 180 int handle_std_request(usb_device_request_setup_packet_t *request, uint8_t *data) 185 /** Handle standard device request. */ 186 int handle_std_request(usbvirt_device_t *device, 187 usb_device_request_setup_packet_t *request, uint8_t *data) 181 188 { 182 189 HANDLE_REQUEST(request, data, USB_DEVREQ_GET_DESCRIPTOR, 183 190 device, on_get_descriptor, 184 handle_get_descriptor( request->value_low, request->value_high,191 handle_get_descriptor(device, request->value_low, request->value_high, 185 192 request->index, request->length)); 186 193 187 194 HANDLE_REQUEST(request, data, USB_DEVREQ_SET_ADDRESS, 188 195 device, on_set_address, 189 handle_set_address( request->value,196 handle_set_address(device, request->value, 190 197 request->index, request->length)); 191 198 192 199 HANDLE_REQUEST(request, data, USB_DEVREQ_SET_CONFIGURATION, 193 200 device, on_set_configuration, 194 handle_set_configuration( request->value,201 handle_set_configuration(device, request->value, 195 202 request->index, request->length)); 196 203
Note:
See TracChangeset
for help on using the changeset viewer.