From fdb82cd1e87b6521cea0c297107e9f03c7d50fa4 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 12 Jul 2011 07:22:36 +0000 Subject: Fixed error in the pipe unordered allocation algorithm for the AVR8 devices breaking compatibility with some devices. --- .../ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c | 2 +- LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c | 2 +- LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c | 14 +++----------- LUFA/ManPages/ChangeLog.txt | 1 + 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c index 2c8c398f9..04548f722 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c +++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c @@ -51,7 +51,7 @@ /** Decodes an Ethernet frame header and prints its contents to through the USART in a human readable format. * - * \param[in] FrameINData Pointer to the start of an Ethernet frame data + * \param[in] InDataStart Pointer to the start of an Ethernet frame of data */ void DecodeEthernetFrameHeader(void* InDataStart) { diff --git a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c index 6d4df036b..9f7cec15e 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c +++ b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c @@ -78,7 +78,7 @@ bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number, continue; Endpoint_DisableEndpoint(); - UECFG1X &= (1 << ALLOC); + UECFG1X &= ~(1 << ALLOC); Endpoint_EnableEndpoint(); UECFG0X = UECFG0XTemp; diff --git a/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c index 5d7c8ac1b..9484abed3 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c +++ b/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c @@ -62,8 +62,6 @@ bool Pipe_ConfigurePipe(const uint8_t Number, uint8_t UPCFG0XTemp; uint8_t UPCFG1XTemp; uint8_t UPCFG2XTemp; - uint8_t UPCONXTemp; - uint8_t UPINRQXTemp; uint8_t UPIENXTemp; Pipe_SelectPipe(PNum); @@ -73,8 +71,6 @@ bool Pipe_ConfigurePipe(const uint8_t Number, UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0)); UPCFG1XTemp = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size)); UPCFG2XTemp = 0; - UPCONXTemp = ((1 << PEN) | (1 << INMODE)); - UPINRQXTemp = 0; UPIENXTemp = 0; } else @@ -82,27 +78,23 @@ bool Pipe_ConfigurePipe(const uint8_t Number, UPCFG0XTemp = UPCFG0X; UPCFG1XTemp = UPCFG1X; UPCFG2XTemp = UPCFG2X; - UPCONXTemp = UPCONX; - UPINRQXTemp = UPINRQX; UPIENXTemp = UPIENX; } - Pipe_SetInfiniteINRequests(); - if (!(UPCFG1XTemp & (1 << ALLOC))) continue; Pipe_DisablePipe(); - UPCFG1X &= (1 << ALLOC); + UPCFG1X &= ~(1 << ALLOC); Pipe_EnablePipe(); UPCFG0X = UPCFG0XTemp; UPCFG1X = UPCFG1XTemp; UPCFG2X = UPCFG2XTemp; - UPCONX = UPCONXTemp; - UPINRQX = UPINRQXTemp; UPIENX = UPIENXTemp; + Pipe_SetInfiniteINRequests(); + if (!(Pipe_IsConfigured())) return false; } diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 829ca44f4..31c960101 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -62,6 +62,7 @@ * - Fixed compile error when FIXED_CONTROL_ENDPOINT_SIZE compile time option was disabled, and a USE_*_DESCRIPTORS compile time * option was not enabled on the AVR8s * - Fixed lack of C++ compatibility in some internal header files causing compile errors when using LUFA in C++ projects + * - Fixed error in the pipe unordered allocation algorithm for the AVR8 devices breaking compatibility with some devices * - Library Applications: * - Fixed incorrect signature in the CDC and DFU class bootloaders for the ATMEGA8U2 * - Fixed KeyboardHost and KeyboardHostWithParser demos displaying incorrect values when numerical keys were pressed -- cgit v1.2.3