X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/e8570c4a37e41117e3fd1e989e0b41f1e9608f3c..359fbfe14d00ab378f85a36664820ea9ba538c3f:/LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h diff --git a/LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h b/LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h index c34715e58..12fa73cd1 100644 --- a/LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h +++ b/LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h @@ -51,6 +51,18 @@ * * Board specific LED driver header for the Paranoid Studio USB2AX (http://paranoidstudio.assembla.com/wiki/show/paranoidstudio/USB2AX). * + * USB2AX: + * + * + * + *
NameColorInfoActive LevelPort Pin
LEDS_LED1GreenGeneral IndicatorHighPORTC.6
+ * + * USB2AX_V3: + * + * + * + *
NameColorInfoActive LevelPort Pin
LEDS_LED1GreenGeneral IndicatorHighPORTD.1
+ * * @{ */ @@ -96,11 +108,11 @@ static inline void LEDs_Init(void) { #if (BOARD == BOARD_USB2AX) - DDRC |= LEDS_ALL_LEDS; - PORTC |= LEDS_ALL_LEDS; + DDRC |= LEDS_ALL_LEDS; + PORTC &= ~LEDS_ALL_LEDS; #else - DDRD |= LEDS_ALL_LEDS; - PORTD |= LEDS_ALL_LEDS; + DDRD |= LEDS_ALL_LEDS; + PORTD &= ~LEDS_ALL_LEDS; #endif } @@ -118,27 +130,27 @@ static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) { #if (BOARD == BOARD_USB2AX) - PORTC &= ~LEDMask; + PORTC |= LEDMask; #else - PORTD &= ~LEDMask; + PORTD |= LEDMask; #endif } static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) { #if (BOARD == BOARD_USB2AX) - PORTC |= LEDMask; + PORTC &= ~LEDMask; #else - PORTD |= LEDMask; + PORTD &= ~LEDMask; #endif } static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) { #if (BOARD == BOARD_USB2AX) - PORTC = ((PORTC | LEDS_ALL_LEDS) & ~LEDMask); + PORTC = ((PORTC & ~LEDS_ALL_LEDS) | LEDMask); #else - PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask); + PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask); #endif } @@ -146,18 +158,18 @@ const uint8_t ActiveMask) { #if (BOARD == BOARD_USB2AX) - PORTC = ((PORTC | LEDMask) & ~ActiveMask); + PORTC = ((PORTC & ~LEDMask) | ActiveMask); #else - PORTD = ((PORTD | LEDMask) & ~ActiveMask); + PORTD = ((PORTD & ~LEDMask) | ActiveMask); #endif } static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) { #if (BOARD == BOARD_USB2AX) - PORTC ^= LEDMask; + PINC = LEDMask; #else - PORTD ^= LEDMask; + PIND = LEDMask; #endif } @@ -165,9 +177,9 @@ static inline uint8_t LEDs_GetLEDs(void) { #if (BOARD == BOARD_USB2AX) - return (~PORTC & LEDS_ALL_LEDS); + return (PORTC & LEDS_ALL_LEDS); #else - return (~PORTD & LEDS_ALL_LEDS); + return (PORTD & LEDS_ALL_LEDS); #endif } #endif