diff --git a/LUFA/Drivers/Board/AVR8/BIGMULTIO/LEDs.h b/LUFA/Drivers/Board/AVR8/BIGMULTIO/LEDs.h index bafedcca34..e696aea5ac 100644 --- a/LUFA/Drivers/Board/AVR8/BIGMULTIO/LEDs.h +++ b/LUFA/Drivers/Board/AVR8/BIGMULTIO/LEDs.h @@ -105,8 +105,8 @@ static inline void LEDs_Disable(void) { - DDRF |= LEDS_PORTF_LEDS; - DDRE |= LEDS_PORTE_LEDS; + DDRF &= ~LEDS_PORTF_LEDS; + DDRE &= ~LEDS_PORTE_LEDS; PORTF &= ~LEDS_PORTF_LEDS; PORTE &= ~LEDS_PORTE_LEDS; diff --git a/LUFA/Drivers/Board/AVR8/MULTIO/LEDs.h b/LUFA/Drivers/Board/AVR8/MULTIO/LEDs.h index 14809df288..03506b4c27 100644 --- a/LUFA/Drivers/Board/AVR8/MULTIO/LEDs.h +++ b/LUFA/Drivers/Board/AVR8/MULTIO/LEDs.h @@ -105,8 +105,8 @@ static inline void LEDs_Disable(void) { - DDRD |= LEDS_PORTD_LEDS; - DDRC |= LEDS_PORTC_LEDS; + DDRD &= ~LEDS_PORTD_LEDS; + DDRC &= ~LEDS_PORTC_LEDS; PORTD &= ~LEDS_PORTD_LEDS; PORTC &= ~LEDS_PORTC_LEDS; diff --git a/LUFA/Drivers/Board/AVR8/OLIMEX32U4/LEDs.h b/LUFA/Drivers/Board/AVR8/OLIMEX32U4/LEDs.h index 62b7c78295..6f5591e7c7 100644 --- a/LUFA/Drivers/Board/AVR8/OLIMEX32U4/LEDs.h +++ b/LUFA/Drivers/Board/AVR8/OLIMEX32U4/LEDs.h @@ -113,11 +113,11 @@ static inline void LEDs_Disable(void) { - DDRB &= LEDS_PORTB_LEDS; + DDRB &= ~LEDS_PORTB_LEDS; PORTB &= ~LEDS_PORTB_LEDS; - DDRD &= (LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT); + DDRD &= ~(LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT); PORTD &= ~(LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT); - DDRE &= LEDS_PORTE_LEDS; + DDRE &= ~LEDS_PORTE_LEDS; PORTE &= ~LEDS_PORTE_LEDS; } diff --git a/LUFA/Drivers/Board/AVR8/OLIMEXT32U4/LEDs.h b/LUFA/Drivers/Board/AVR8/OLIMEXT32U4/LEDs.h index 1602af8429..d1d19093e3 100644 --- a/LUFA/Drivers/Board/AVR8/OLIMEXT32U4/LEDs.h +++ b/LUFA/Drivers/Board/AVR8/OLIMEXT32U4/LEDs.h @@ -107,11 +107,11 @@ static inline void LEDs_Disable(void) { - DDRB &= LEDS_PORTB_LEDS; + DDRB &= ~LEDS_PORTB_LEDS; PORTB &= ~LEDS_PORTB_LEDS; - DDRD &= LEDS_PORTD_LEDS; + DDRD &= ~LEDS_PORTD_LEDS; PORTD &= ~LEDS_PORTD_LEDS; - DDRE &= LEDS_PORTE_LEDS; + DDRE &= ~LEDS_PORTE_LEDS; PORTE &= ~LEDS_PORTE_LEDS; }