diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2012-03-20 06:18:41 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2012-03-20 06:18:41 +0000 |
| commit | 22287f9f880551720cfaa3d3fbd9f6bd5262fb10 (patch) | |
| tree | d25c3bec533f449bb9e6bd4a8909b06ea4700b61 /LUFA/Drivers/Board/AVR8 | |
| parent | 9508446106d608d3d12fc615f021284f8725c8ce (diff) | |
Fixed inverted LED logic in the OLIMEX162 board LED driver.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@2117 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/Board/AVR8')
| -rw-r--r-- | LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h b/LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h index 2e18e10c..c9bd3f13 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 |
