X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/fc92f9969c1fcc2f952f0bd6d09a309a9b3ce02f..fdcb486e225f75ebc9fdc10685b1bb7570d481e6:/LUFA/Drivers/Board/STK526/LEDs.h diff --git a/LUFA/Drivers/Board/STK526/LEDs.h b/LUFA/Drivers/Board/STK526/LEDs.h index 597b68a56..de65d26b3 100644 --- a/LUFA/Drivers/Board/STK526/LEDs.h +++ b/LUFA/Drivers/Board/STK526/LEDs.h @@ -109,14 +109,15 @@ PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask); } - static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) + static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, + const uint8_t ActiveMask) { - PORTD = ((PORTD & ~(LEDMask & LEDS_ALL_LEDS)) | (ActiveMask & LEDS_ALL_LEDS)); + PORTD = ((PORTD & ~LEDMask) | ActiveMask); } static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) { - PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS)); + PORTD ^= LEDMask; } static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;