Build: Fix incorrect build target for Ubuntu CI builds.
[pub/USBasp.git] / LUFA / Drivers / Board / AVR8 / UNO / LEDs.h
index 1fddba7..04b94e7 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2012.
+     Copyright (C) Dean Camera, 2019.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2012  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
@@ -18,7 +18,7 @@
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
-  The author disclaim all warranties with regard to this
+  The author disclaims all warranties with regard to this
   software, including all implied warranties of merchantability
   and fitness.  In no event shall the author be liable for any
   special, indirect or consequential damages or any damages
   software, including all implied warranties of merchantability
   and fitness.  In no event shall the author be liable for any
   special, indirect or consequential damages or any damages
  *
  *  Board specific LED driver header for the Arduino Uno (http://arduino.cc/en/Main/ArduinoBoardUno).
  *
  *
  *  Board specific LED driver header for the Arduino Uno (http://arduino.cc/en/Main/ArduinoBoardUno).
  *
+ *  <table>
+ *    <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ *    <tr><td>LEDS_LED1</td><td>Yellow</td><td>RX</td><td>Low</td><td>PORTD.5</td></tr>
+ *    <tr><td>LEDS_LED2</td><td>Yellow</td><td>TX</td><td>Low</td><td>PORTD.4</td></tr>
+ *  </table>
+ *
  *  @{
  */
 
  *  @{
  */
 
        /* Public Interface - May be used in end-application: */
                /* Macros: */
                        /** LED mask for the first LED on the board. */
        /* Public Interface - May be used in end-application: */
                /* Macros: */
                        /** LED mask for the first LED on the board. */
-                       #define LEDS_LED1        (1 << 4)
+                       #define LEDS_LED1        (1 << 5)
 
                        /** LED mask for the second LED on the board. */
 
                        /** LED mask for the second LED on the board. */
-                       #define LEDS_LED2        (1 << 5)
+                       #define LEDS_LED2        (1 << 4)
 
                        /** LED mask for all the LEDs on the board. */
                        #define LEDS_ALL_LEDS    (LEDS_LED1 | LEDS_LED2)
 
                        /** LED mask for all the LEDs on the board. */
                        #define LEDS_ALL_LEDS    (LEDS_LED1 | LEDS_LED2)
                        /** LED mask for none of the board LEDs. */
                        #define LEDS_NO_LEDS     0
 
                        /** LED mask for none of the board LEDs. */
                        #define LEDS_NO_LEDS     0
 
+                       /** LED mask for the library LED driver, to indicate TX activity. */
+                       #define LEDMASK_TX       LEDS_LED1
+
+                       /** LED mask for the library LED driver, to indicate RX activity. */
+                       #define LEDMASK_RX       LEDS_LED2
+
                /* Inline Functions: */
                #if !defined(__DOXYGEN__)
                        static inline void LEDs_Init(void)
                /* Inline Functions: */
                #if !defined(__DOXYGEN__)
                        static inline void LEDs_Init(void)
@@ -86,7 +98,7 @@
                        static inline void LEDs_Disable(void)
                        {
                                DDRD  &= ~LEDS_ALL_LEDS;
                        static inline void LEDs_Disable(void)
                        {
                                DDRD  &= ~LEDS_ALL_LEDS;
-                               PORTD &= ~LEDS_ALL_LEDS;
+                               PORTD |= LEDS_ALL_LEDS;
                        }
 
                        static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
                        }
 
                        static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 
                        static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
                        {
 
                        static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
                        {
-                               PORTD ^= LEDMask;
+                               PIND  = LEDMask;
                        }
 
                        static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
                        static inline uint8_t LEDs_GetLEDs(void)
                        {
                        }
 
                        static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
                        static inline uint8_t LEDs_GetLEDs(void)
                        {
-                               return (PORTD & LEDS_ALL_LEDS);
+                               return (~PORTD & LEDS_ALL_LEDS);
                        }
                #endif
 
                        }
                #endif