X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/5563da6a626a7301e5064a8df8b3a9b03421f8aa..0fb92f044100bab1e473cddcdd4c659d28a40895:/LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h?ds=sidebyside diff --git a/LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h b/LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h index 94526045d..c9bd3f135 100644 --- a/LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h +++ b/LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2011. + Copyright (C) Dean Camera, 2012. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -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