/*
LUFA Library
- Copyright (C) Dean Camera, 2012.
+ Copyright (C) Dean Camera, 2015.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 2015 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
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
*
* <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>Green</td><td>TX</td><td>High</td><td>PORTD.5</td></tr>
- * <tr><td>LEDS_LED2</td><td>Yellow</td><td>RX</td><td>High</td><td>PORTB.0</td></tr>
+ * <tr><td>LEDS_LED1</td><td>Yellow</td><td>RX</td><td>High</td><td>PORTB.0</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>TX</td><td>High</td><td>PORTD.5</td></tr>
* <tr><td>LEDS_LED3</td><td>N/A</td><td>General Indicator (Not Mounted)</td><td>High</td><td>PORTE.6</td></tr>
* </table>
*
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
- #define LEDS_PORTB_LEDS (LEDS_LED2)
- #define LEDS_PORTD_LEDS (LEDS_LED1)
+ #define LEDS_PORTB_LEDS (LEDS_LED1)
+ #define LEDS_PORTD_LEDS (LEDS_LED2)
#define LEDS_PORTE_LEDS (LEDS_LED3)
#endif
-
+
/* Public Interface - May be used in end-application: */
/* Macros: */
/** LED mask for the first LED on the board. */
- #define LEDS_LED1 (1 << 5)
+ #define LEDS_LED1 (1 << 0)
/** LED mask for the second LED on the board. */
- #define LEDS_LED2 (1 << 0)
+ #define LEDS_LED2 (1 << 5)
/** LED mask for the third LED on the board. */
#define LEDS_LED3 (1 << 6)
-
+
/** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
static inline void LEDs_Disable(void)
{
- DDRB &= LEDS_PORTB_LEDS;
+ DDRB &= ~LEDS_PORTB_LEDS;
PORTB &= ~LEDS_PORTB_LEDS;
- DDRD &= LEDS_PORTD_LEDS;
+ DDRD &= ~LEDS_PORTD_LEDS;
PORTD &= ~LEDS_PORTD_LEDS;
- DDRE &= LEDS_PORTE_LEDS;
+ DDRE &= ~LEDS_PORTE_LEDS;
PORTE &= ~LEDS_PORTE_LEDS;
}