Fix typos in the XMEGA board LED drivers, use a cleaner change and set implementation.
authorDean Camera <dean@fourwalledcubicle.com>
Wed, 12 Jun 2013 16:43:06 +0000 (18:43 +0200)
committerDean Camera <dean@fourwalledcubicle.com>
Wed, 12 Jun 2013 16:43:06 +0000 (18:43 +0200)
LUFA/DoxygenPages/LUFAPoweredProjects.txt
LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h
LUFA/Drivers/Board/XMEGA/B1_XPLAINED/LEDs.h
LUFA/Drivers/Board/XMEGA/C3_XPLAINED/LEDs.h

index e689bc9..e8ff40b 100644 (file)
  *  \li Elektor Magazine, "USB is Cool/Sucks" by Jerry Jacobs and Chris Vossen (minor mention), January 2010 Issue
  *  \li Elektor Magazine, "20 x Open Source" by Jens Nickel, March 2010 Issue
  *  \li Circuit Cellar Magazine, "Advanced USB Design Debugging" by Collin O'Flynn, August 2010 Issue
+ *  \li "Some Assembly Required: Assembly Language Programming with the AVR Microcontroller" by Timothy S. Margush
  *  \li Elektor Magazine, "Taming the Beast (2)" by Clemens Valens/Raymond Vermeulen, January 2013 Issue
  *
  *  \section Sec_LUFANotableMentions Other Notable Mentions of LUFA
- *  The following are non-magazine but notable mentions of the LUFA library.
+ *  The following are non-print but notable mentions of the LUFA library.
  *
  *  \li Adafruit "Ask an Engineer", 7th November 2010
  *  \li Arduino 2010 Keynote speech
index 8487daa..925bd26 100644 (file)
 
                        static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
                        {
-                               PORTR_OUT = ((PORTR.OUT & ~LEDS_PORTR_LEDS) | (LEDMask & LEDS_PORTR_LEDS));
-                               PORTD_OUT = ((PORTD.OUT & ~LEDS_PORTD_LEDS) | (LEDMask & LEDS_PORTD_LEDS));
+                               PORTR_OUTCLR = LEDS_PORTR_LEDS;
+                               PORTD_OUTCLR = LEDS_PORTD_LEDS;
+
+                               PORTR_OUTSET = (LEDMask & LEDS_PORTR_LEDS);
+                               PORTD_OUTSET = (LEDMask & LEDS_PORTD_LEDS);
                        }
 
-                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask)
+                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
+                                                          const uint8_t ActiveMask)
                        {
-                               PORTR_OUT = (PORTR.OUT & ~(LEDMask & LEDS_PORTR_LEDS)) | (Active & LEDS_PORTR_LEDS);
-                               PORTD_OUT = (PORTD.OUT & ~(LEDMask & LEDS_PORTD_LEDS)) | (Active & LEDS_PORTD_LEDS);
+                               PORTR_OUTCLR = (LEDMask & LEDS_PORTR_LEDS);
+                               PORTD_OUTCLR = (LEDMask & LEDS_PORTD_LEDS);
+
+                               PORTR_OUTSET = (ActiveMask & LEDS_PORTR_LEDS);
+                               PORTD_OUTSET = (ActiveMask & LEDS_PORTD_LEDS);
                        }
 
                        static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
index caa5cd7..50ef7d8 100644 (file)
                        {
                                PORTB.DIRCLR    = LEDS_PORTB_LEDS;
                                PORTB.OUTCLR    = LEDS_PORTB_LEDS;
-                               
+
                                PORTCFG.MPCMASK = 0;
                                PORTB.PIN0CTRL  = LEDS_PORTB_LEDS;
 
                                PORTE_OUTSET = ((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT);
                        }
 
-                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask)
+                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
+                                                          const uint8_t ActiveMask)
                        {
                                PORTB_OUTCLR =  (LEDMask & LEDS_PORTB_LEDS);
                                PORTE_OUTCLR = ((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT);
-                       
+
                                PORTB_OUTSET =  (ActiveMask & LEDS_PORTB_LEDS);
                                PORTE_OUTSET = ((ActiveMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT);
                        }
index d348853..348eedf 100644 (file)
 
                        static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
                        {
-                               PORTR_OUT = ((PORTR.OUT & ~LEDS_PORTR_LEDS) | (LEDMask & LEDS_PORTR_LEDS));
-                               PORTD_OUT = ((PORTD.OUT & ~LEDS_PORTD_LEDS) | (LEDMask & LEDS_PORTD_LEDS));
+                               PORTR_OUTCLR = LEDS_PORTR_LEDS;
+                               PORTD_OUTCLR = LEDS_PORTD_LEDS;
+
+                               PORTR_OUTSET = (LEDMask & LEDS_PORTR_LEDS);
+                               PORTD_OUTSET = (LEDMask & LEDS_PORTD_LEDS);
                        }
 
-                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask)
+                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
+                                                          const uint8_t ActiveMask)
                        {
-                               PORTR_OUT = (PORTR.OUT & ~(LEDMask & LEDS_PORTR_LEDS)) | (Active & LEDS_PORTR_LEDS);
-                               PORTD_OUT = (PORTD.OUT & ~(LEDMask & LEDS_PORTD_LEDS)) | (Active & LEDS_PORTD_LEDS);
+                               PORTR_OUTCLR = (LEDMask & LEDS_PORTR_LEDS);
+                               PORTD_OUTCLR = (LEDMask & LEDS_PORTD_LEDS);
+
+                               PORTR_OUTSET = (ActiveMask & LEDS_PORTR_LEDS);
+                               PORTD_OUTSET = (ActiveMask & LEDS_PORTD_LEDS);
                        }
 
                        static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)