diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-03-20 06:18:41 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-03-20 06:18:41 +0000 |
commit | a77c3edc37938521850e451b962f2f4ea7859945 (patch) | |
tree | d25c3bec533f449bb9e6bd4a8909b06ea4700b61 | |
parent | e58915344d934395463d69876ab43bef0d93034a (diff) | |
download | lufa-a77c3edc37938521850e451b962f2f4ea7859945.tar.gz lufa-a77c3edc37938521850e451b962f2f4ea7859945.tar.bz2 lufa-a77c3edc37938521850e451b962f2f4ea7859945.zip |
Fixed inverted LED logic in the OLIMEX162 board LED driver.
-rw-r--r-- | LUFA/DoxygenPages/ChangeLog.txt | 1 | ||||
-rw-r--r-- | LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h | 14 |
2 files changed, 8 insertions, 7 deletions
diff --git a/LUFA/DoxygenPages/ChangeLog.txt b/LUFA/DoxygenPages/ChangeLog.txt index 7d0b63ed1..ba9c80558 100644 --- a/LUFA/DoxygenPages/ChangeLog.txt +++ b/LUFA/DoxygenPages/ChangeLog.txt @@ -28,6 +28,7 @@ * - Fixed incorrect call to the user callback CALLBACK_Audio_Device_GetSetInterfaceProperty() in the Audio Class device driver (thanks to Tiit Ratsep) * - Fixed compile error for the UC3 architecture when INTERRUPT_CONTROL_ENDPOINT is specified (thanks to Andrus Aaslaid) * - Fixed compile error if LEDs_Disable() is called and BOARD=NONE is set (thanks to Sam Lin) + * - Fixed inverted LED logic in the OLIMEX162 board LED driver * - Library Applications: * - Fixed error in the AVRISP-MKII programmer when ISP mode is used at 64KHz (thanks to Ben R. Porter) * diff --git a/LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h b/LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h index 2e18e10c0..c9bd3f135 100644 --- a/LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h +++ b/LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h @@ -76,8 +76,8 @@ #if !defined(__DOXYGEN__) static inline void LEDs_Init(void) { - DDRD |= LEDS_ALL_LEDS; - PORTD |= LEDS_ALL_LEDS; + DDRD |= LEDS_ALL_LEDS; + PORTD &= ~LEDS_ALL_LEDS; } static inline void LEDs_Disable(void) @@ -88,23 +88,23 @@ static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) { - PORTD &= ~LEDMask; + PORTD |= LEDMask; } static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) { - PORTD |= LEDMask; + PORTD &= ~LEDMask; } static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) { - PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask); + PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask); } static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) { - PORTD = ((PORTD | LEDMask) & ~ActiveMask); + PORTD = ((PORTD & ~LEDMask) | ActiveMask); } static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) @@ -115,7 +115,7 @@ static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; static inline uint8_t LEDs_GetLEDs(void) { - return (~PORTD & LEDS_ALL_LEDS); + return (PORTD & LEDS_ALL_LEDS); } #endif |