aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Core/DeviceStandardReq.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-03-05 11:34:04 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-03-05 11:34:04 +0000
commitb763c3f33e8596afe2dd21746890fa9641362c5e (patch)
tree4253888dedfecf7500b3aaed743c5b0dfd88a840 /LUFA/Drivers/USB/Core/DeviceStandardReq.c
parent33a81bffb9e3f856c1d3446d7292795774ae91a8 (diff)
downloadlufa-b763c3f33e8596afe2dd21746890fa9641362c5e.tar.gz
lufa-b763c3f33e8596afe2dd21746890fa9641362c5e.tar.bz2
lufa-b763c3f33e8596afe2dd21746890fa9641362c5e.zip
Porting updates for the UC3B architecture - get UC3B partially enumerating using a modified mouse demo on the EVK1101. Implement a software FIFO for the endpoint banks; datasheet hints that this can be done through hardware as on the AVR8 architecture, but the correct method to do this not discovered yet.
Diffstat (limited to 'LUFA/Drivers/USB/Core/DeviceStandardReq.c')
-rw-r--r--LUFA/Drivers/USB/Core/DeviceStandardReq.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/LUFA/Drivers/USB/Core/DeviceStandardReq.c b/LUFA/Drivers/USB/Core/DeviceStandardReq.c
index f0c336eda..e43543dfe 100644
--- a/LUFA/Drivers/USB/Core/DeviceStandardReq.c
+++ b/LUFA/Drivers/USB/Core/DeviceStandardReq.c
@@ -48,10 +48,11 @@ bool USB_RemoteWakeupEnabled;
void USB_Device_ProcessControlRequest(void)
{
- uint8_t* RequestHeader = (uint8_t*)&USB_ControlRequest;
-
- for (uint8_t RequestHeaderByte = 0; RequestHeaderByte < sizeof(USB_Request_Header_t); RequestHeaderByte++)
- *(RequestHeader++) = Endpoint_Read_Byte();
+ USB_ControlRequest.bmRequestType = Endpoint_Read_Byte();
+ USB_ControlRequest.bRequest = Endpoint_Read_Byte();
+ USB_ControlRequest.wValue = le16_to_cpu(Endpoint_Read_Word_LE());
+ USB_ControlRequest.wIndex = le16_to_cpu(Endpoint_Read_Word_LE());
+ USB_ControlRequest.wLength = le16_to_cpu(Endpoint_Read_Word_LE());
EVENT_USB_Device_ControlRequest();