diff options
Diffstat (limited to 'LUFA/Drivers/USB/Core/DeviceStandardReq.c')
-rw-r--r-- | LUFA/Drivers/USB/Core/DeviceStandardReq.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/Core/DeviceStandardReq.c b/LUFA/Drivers/USB/Core/DeviceStandardReq.c index c3a111e35..59d3f2896 100644 --- a/LUFA/Drivers/USB/Core/DeviceStandardReq.c +++ b/LUFA/Drivers/USB/Core/DeviceStandardReq.c @@ -48,11 +48,18 @@ bool USB_Device_RemoteWakeupEnabled; void USB_Device_ProcessControlRequest(void) { + #if defined(ARCH_BIG_ENDIAN) USB_ControlRequest.bmRequestType = Endpoint_Read_8(); USB_ControlRequest.bRequest = Endpoint_Read_8(); USB_ControlRequest.wValue = Endpoint_Read_16_LE(); USB_ControlRequest.wIndex = Endpoint_Read_16_LE(); USB_ControlRequest.wLength = Endpoint_Read_16_LE(); + #else + uint8_t* RequestHeader = (uint8_t*)&USB_ControlRequest; + + for (uint8_t RequestHeaderByte = 0; RequestHeaderByte < sizeof(USB_Request_Header_t); RequestHeaderByte++) + *(RequestHeader++) = Endpoint_Read_8(); + #endif EVENT_USB_Device_ControlRequest(); |