Mark build test makefiles as being incompatible with parallel make builds, as they...
[pub/USBasp.git] / LUFA / Drivers / Board / AVR8 / OLIMEX162 / LEDs.h
index 6ef67e3..21fb500 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 /*
 */
 
 /*
-  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
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
  *
  *  Board specific LED driver header for the Olimex AVR-USB-162 (http://www.olimex.com/dev/avr-usb-162.html).
  *
  *
  *  Board specific LED driver header for the Olimex AVR-USB-162 (http://www.olimex.com/dev/avr-usb-162.html).
  *
+ *  <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>General Indicator</td><td>High</td><td>PORTD.4</td></tr>
+ *  </table>
+ *
  *  @{
  */
 
  *  @{
  */
 
@@ -76,8 +81,8 @@
                #if !defined(__DOXYGEN__)
                        static inline void LEDs_Init(void)
                        {
                #if !defined(__DOXYGEN__)
                        static inline void LEDs_Init(void)
                        {
-                               DDRD  |= LEDS_ALL_LEDS;
-                               PORTD |= LEDS_ALL_LEDS;
+                               DDRD  |=  LEDS_ALL_LEDS;
+                               PORTD &= ~LEDS_ALL_LEDS;
                        }
 
                        static inline void LEDs_Disable(void)
                        }
 
                        static inline void LEDs_Disable(void)
 
                        static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
                        {
 
                        static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
                        {
-                               PORTD &= ~LEDMask;
+                               PORTD |= LEDMask;
                        }
 
                        static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
                        {
                        }
 
                        static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
                        {
-                               PORTD |= LEDMask;
+                               PORTD &= ~LEDMask;
                        }
 
                        static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
                        {
                        }
 
                        static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
                        {
-                               PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask);
+                               PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask);
                        }
 
                        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)
                        {
-                               PORTD = ((PORTD | LEDMask) & ~ActiveMask);
+                               PORTD = ((PORTD & ~LEDMask) | ActiveMask);
                        }
 
                        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