Documentation: Add additional project links.
[pub/USBasp.git] / LUFA / Drivers / Board / XMEGA / C3_XPLAINED / LEDs.h
index d348853..732aca4 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2013.
+     Copyright (C) Dean Camera, 2019.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2013  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2019  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
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
 
                        static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
                        {
 
                        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)
                        }
 
                        static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)