X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/6a10d6b465be27db090d760dc0fbe722c94e4344..e57e08c67237cf73d28afac7f672ec1e74ec308d:/LUFA/Drivers/Board/STK525/LEDs.h diff --git a/LUFA/Drivers/Board/STK525/LEDs.h b/LUFA/Drivers/Board/STK525/LEDs.h index 13f626c2b..73c03f75a 100644 --- a/LUFA/Drivers/Board/STK525/LEDs.h +++ b/LUFA/Drivers/Board/STK525/LEDs.h @@ -35,6 +35,12 @@ * \note This file should not be included directly. It is automatically included as needed by the LEDs driver * dispatch header located in LUFA/Drivers/Board/LEDs.h. */ + +/** \ingroup Group_LEDs + * @defgroup Group_LEDs_STK525 STK525 + * + * @{ + */ #ifndef __LEDS_STK525_H__ #define __LEDS_STK525_H__ @@ -82,26 +88,31 @@ PORTD &= ~LEDS_ALL_LEDS; } - static inline void LEDs_TurnOnLEDs(const uint8_t LedMask) + static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) { - PORTD |= LedMask; + PORTD |= LEDMask; } - static inline void LEDs_TurnOffLEDs(const uint8_t LedMask) + static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) { - PORTD &= ~LedMask; + PORTD &= ~LEDMask; } - static inline void LEDs_SetAllLEDs(const uint8_t 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) + 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) + { + PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS)); + } + static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; static inline uint8_t LEDs_GetLEDs(void) { @@ -115,3 +126,5 @@ #endif #endif + +/** @} */