From b711b7d6a484204098eeccc03845b454bb1ad208 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 22 Nov 2011 08:06:52 +0000 Subject: Fixed broken AVR32 endpoint/pipe communications when ORDERED_EP_CONFIG compile time option is not enabled (thanks to Matthias). Fixed broken compilation for the AVR32 devices if the NO_SOF_EVENTS compile time option was not enabled (thanks to Matthias). --- LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c') diff --git a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c index 7cd7ccf25..c8e3af72a 100644 --- a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c +++ b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c @@ -45,19 +45,20 @@ volatile uint8_t* USB_Endpoint_FIFOPos[ENDPOINT_TOTAL_ENDPOINTS]; bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number, const uint32_t UECFG0Data) { + USB_Endpoint_FIFOPos[Number] = &AVR32_USBB_SLAVE[Number * 0x10000]; + #if defined(CONTROL_ONLY_DEVICE) || defined(ORDERED_EP_CONFIG) Endpoint_SelectEndpoint(Number); Endpoint_EnableEndpoint(); (&AVR32_USBB.uecfg0)[Number] = 0; (&AVR32_USBB.uecfg0)[Number] = UECFG0Data; - USB_EndpointFIFOPos[Number] = &AVR32_USBB_SLAVE[Number * 0x10000]; return Endpoint_IsConfigured(); #else for (uint8_t EPNum = Number; EPNum < ENDPOINT_TOTAL_ENDPOINTS; EPNum++) { - uint8_t UECFG0Temp; + uint32_t UECFG0Temp; Endpoint_SelectEndpoint(EPNum); @@ -95,7 +96,7 @@ void Endpoint_ClearEndpoints(void) Endpoint_SelectEndpoint(EPNum); (&AVR32_USBB.uecfg0)[EPNum] = 0; (&AVR32_USBB.uecon0clr)[EPNum] = -1; - USB_EndpointFIFOPos[EPNum] = &AVR32_USBB_SLAVE[EPNum * 0x10000]; + USB_Endpoint_FIFOPos[EPNum] = &AVR32_USBB_SLAVE[EPNum * 0x10000]; Endpoint_DisableEndpoint(); } } -- cgit v1.2.3