diff options
Diffstat (limited to 'LUFA/Drivers/Board/XPLAIN/LEDs.h')
-rw-r--r-- | LUFA/Drivers/Board/XPLAIN/LEDs.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/LUFA/Drivers/Board/XPLAIN/LEDs.h b/LUFA/Drivers/Board/XPLAIN/LEDs.h index 6951ce763..600be9f26 100644 --- a/LUFA/Drivers/Board/XPLAIN/LEDs.h +++ b/LUFA/Drivers/Board/XPLAIN/LEDs.h @@ -75,28 +75,28 @@ #if !defined(__DOXYGEN__)
static inline void LEDs_Init(void)
{
- DDRB |= LEDS_ALL_LEDS;
- PORTB &= ~LEDS_ALL_LEDS;
+ DDRB |= LEDS_ALL_LEDS;
+ PORTB |= LEDS_ALL_LEDS;
}
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
- PORTB |= LEDMask;
+ PORTB &= ~LEDMask;
}
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
{
- PORTB &= ~LEDMask;
+ PORTB |= LEDMask;
}
static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
{
- PORTB = ((PORTB & ~LEDS_ALL_LEDS) | LEDMask);
+ PORTB = ((PORTB | LEDS_ALL_LEDS) & ~LEDMask);
}
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask)
{
- PORTB = ((PORTB & ~(LEDMask & LEDS_ALL_LEDS)) | (ActiveMask & LEDS_ALL_LEDS));
+ PORTB = ((PORTB | (LEDMask & LEDS_ALL_LEDS)) & (~ActiveMask & LEDS_ALL_LEDS));
}
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
@@ -107,7 +107,7 @@ static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
- return (PORTB & LEDS_ALL_LEDS);
+ return (~PORTB & LEDS_ALL_LEDS);
}
#endif
|