diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-07-29 08:12:00 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-07-29 08:12:00 +0000 |
commit | 40728fd20dc87eebab964ce8dc42db6df3d72a65 (patch) | |
tree | 1962ef2fc280a54747d0d28b0b85b517bb93f493 /LUFA/Drivers/USB/Core/AVR8 | |
parent | 025742fca89e78d33f37b229c97607460a3a78d5 (diff) | |
download | lufa-40728fd20dc87eebab964ce8dc42db6df3d72a65.tar.gz lufa-40728fd20dc87eebab964ce8dc42db6df3d72a65.tar.bz2 lufa-40728fd20dc87eebab964ce8dc42db6df3d72a65.zip |
Remove redundant calls to USB_USBTask() in the Mass Storage Device Class driver when INTERRUPT_CONTROL_ENDPOINT is not used, as this is done inside the stream callbacks.
Fix implementations of Endpoint_SetEndpointDirection() and Endpoint_GetEndpointDirection() for the AVR8 architecture.
Diffstat (limited to 'LUFA/Drivers/USB/Core/AVR8')
-rw-r--r-- | LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h index d1bea6dfd..f14d4839b 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h +++ b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h @@ -587,7 +587,7 @@ static inline uint8_t Endpoint_GetEndpointDirection(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint8_t Endpoint_GetEndpointDirection(void) { - return (UECFG0X & ENDPOINT_DIR_IN); + return (UECFG0X & (1 << EPDIR)) ? ENDPOINT_DIR_IN : ENDPOINT_DIR_OUT; } /** Sets the direction of the currently selected endpoint. @@ -597,7 +597,7 @@ static inline void Endpoint_SetEndpointDirection(const uint8_t DirectionMask) ATTR_ALWAYS_INLINE; static inline void Endpoint_SetEndpointDirection(const uint8_t DirectionMask) { - UECFG0X = ((UECFG0X & ~ENDPOINT_DIR_IN) | DirectionMask); + UECFG0X = ((UECFG0X & ~(1 << EPDIR)) | (DirectionMask ? (1 << EPDIR) : 0)); } /** Reads one byte from the currently selected endpoint's bank, for OUT direction endpoints. |