X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/910bca557cbdc34dbc8db9df91d00103ffd73c88..0da99447d3e88e83f9977501bee56af5c7aa56c0:/LUFA/Drivers/Board/AVR8/UDIP/LEDs.h diff --git a/LUFA/Drivers/Board/AVR8/UDIP/LEDs.h b/LUFA/Drivers/Board/AVR8/UDIP/LEDs.h index 53789038a..7ad6c44b3 100644 --- a/LUFA/Drivers/Board/AVR8/UDIP/LEDs.h +++ b/LUFA/Drivers/Board/AVR8/UDIP/LEDs.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2011. + Copyright (C) Dean Camera, 2012. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -42,6 +42,14 @@ * * Board specific LED driver header for the Linnix UDIP (http://linnix.com/udip/). * + * + * + * + * + * + * + *
NameColorInfoActive LevelPort Pin
LEDS_LED1GreenBicolor Indicator 1HighPORTB.6
LEDS_LED2RedBicolor Indicator 1HighPORTB.5
LEDS_LED3GreenBicolor Indicator 2HighPORTD.5
LEDS_LED4RedBicolor Indicator 2HighPORTD.4
+ * * @{ */ @@ -98,6 +106,12 @@ DDRD |= (LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT); } + static inline void LEDs_Disable(void) + { + DDRB &= ~LEDS_PORTB_LEDS; + DDRD &= ~(LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT); + } + static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) { PORTB |= (LEDMask & LEDS_PORTB_LEDS); @@ -127,8 +141,8 @@ static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) { - PORTB ^= (LEDMask & LEDS_PORTB_LEDS); - PORTD ^= ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT); + PINB = (LEDMask & LEDS_PORTB_LEDS); + PIND = ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT); } static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;