diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-07-12 07:22:36 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-07-12 07:22:36 +0000 |
commit | fdb82cd1e87b6521cea0c297107e9f03c7d50fa4 (patch) | |
tree | 73055e1e2812a4d304f9b30bbc9c603e60645e15 /LUFA/Drivers/USB | |
parent | 04287b76c578b61fb16c90600af622d3e22e523b (diff) | |
download | lufa-fdb82cd1e87b6521cea0c297107e9f03c7d50fa4.tar.gz lufa-fdb82cd1e87b6521cea0c297107e9f03c7d50fa4.tar.bz2 lufa-fdb82cd1e87b6521cea0c297107e9f03c7d50fa4.zip |
Fixed error in the pipe unordered allocation algorithm for the AVR8 devices breaking compatibility with some devices.
Diffstat (limited to 'LUFA/Drivers/USB')
-rw-r--r-- | LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c | 14 |
2 files changed, 4 insertions, 12 deletions
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; } |