aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Drivers/USB/Core/DeviceStandardReq.c
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-03-05 11:34:04 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-03-05 11:34:04 +0000
commite06cc0134d3a0a2b193fa517edd78b7b4b16e814 (patch)
tree4253888dedfecf7500b3aaed743c5b0dfd88a840 /LUFA/Drivers/USB/Core/DeviceStandardReq.c
parent78b370bdf820bea0736b0f88a092089cba7fa973 (diff)
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.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1696 d5102386-fcda-11dd-9fdb-3debd5008f28
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 f0c336ed..e43543df 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();