X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/910bca557cbdc34dbc8db9df91d00103ffd73c88..0da99447d3e88e83f9977501bee56af5c7aa56c0:/LUFA/Drivers/Board/AVR8/BUI/LEDs.h diff --git a/LUFA/Drivers/Board/AVR8/BUI/LEDs.h b/LUFA/Drivers/Board/AVR8/BUI/LEDs.h index aeb757a8b..039e9efa7 100644 --- a/LUFA/Drivers/Board/AVR8/BUI/LEDs.h +++ b/LUFA/Drivers/Board/AVR8/BUI/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,13 @@ * * Board specific LED driver header for the Busware BUI (http://www.busware.de/tiki-index.php?page=BUI). * + * + * + * + * + * + *
NameColorInfoActive LevelPort Pin
LEDS_LED1RedRGB LEDHighPORTC.2
LEDS_LED2GreenRGB LEDHighPORTC.3
LEDS_LED3BlueRGB LEDHighPORTC.4
+ * * @{ */ @@ -82,7 +89,14 @@ #if !defined(__DOXYGEN__) static inline void LEDs_Init(void) { - DDRC |= LEDS_ALL_LEDS; + DDRC |= LEDS_ALL_LEDS; + PORTC &= ~LEDS_ALL_LEDS; + } + + static inline void LEDs_Disable(void) + { + DDRC &= ~LEDS_ALL_LEDS; + PORTC &= ~LEDS_ALL_LEDS; } static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) @@ -108,7 +122,7 @@ static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) { - PORTC ^= LEDMask; + PINC = LEDMask; } static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;