Add extra LUFA TAR archive export exclusions.
[pub/USBasp.git] / LUFA / Drivers / Board / AVR8 / TEENSY / LEDs.h
index 63b96b0..9a71cf5 100644 (file)
@@ -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
@@ -35,7 +35,7 @@
  *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
  *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
  */
+
 /** \ingroup Group_LEDs
  *  \defgroup Group_LEDs_TEENSY2 TEENSY2
  *  \brief Board specific LED driver header for the PJRC Teensy 2 boards.
                                DDRD  |= LEDS_ALL_LEDS;
 
                                #if (BOARD == BOARD_TEENSY2)
-                               PORTD &= ~LEDS_ALL_LEDS;                                
+                               PORTD &= ~LEDS_ALL_LEDS;
                                #else
                                PORTD |=  LEDS_ALL_LEDS;
                                #endif
                        }
 
+                       static inline void LEDs_Disable(void)
+                       {
+                               DDRD  &= ~LEDS_ALL_LEDS;
+                               PORTD &= ~LEDS_ALL_LEDS;
+                       }
+
                        static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
                        {
                                #if (BOARD == BOARD_TEENSY2)
-                               PORTD |=  LEDMask;                              
+                               PORTD |=  LEDMask;
                                #else
                                PORTD &= ~LEDMask;
                                #endif
                        static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
                        {
                                #if (BOARD == BOARD_TEENSY2)
-                               PORTD &= ~LEDMask;                              
+                               PORTD &= ~LEDMask;
                                #else
                                PORTD |=  LEDMask;
                                #endif
                                                           const uint8_t ActiveMask)
                        {
                                #if (BOARD == BOARD_TEENSY2)
-                               PORTD = ((PORTD & ~LEDMask) | ActiveMask);                              
+                               PORTD = ((PORTD & ~LEDMask) | ActiveMask);
                                #else
                                PORTD = ((PORTD | LEDMask) & ~ActiveMask);
                                #endif
                        static inline uint8_t LEDs_GetLEDs(void)
                        {
                                #if (BOARD == BOARD_TEENSY2)
-                               return (PORTD & LEDS_ALL_LEDS);                         
+                               return (PORTD & LEDS_ALL_LEDS);
                                #else
                                return (~PORTD & LEDS_ALL_LEDS);
                                #endif