aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers
diff options
context:
space:
mode:
authorNico <NicoHood@users.noreply.github.com>2015-02-24 09:38:12 +0100
committerNico <NicoHood@users.noreply.github.com>2015-02-24 09:38:12 +0100
commit6e5df9e4bec787221ce410e118ef26af9e802e2a (patch)
treeab3a7cca68be94209571acdcb23c4f8ceaacff6b /LUFA/Drivers
parent31f4260705c0226818ca7302f5f6156e20a18d9e (diff)
downloadlufa-6e5df9e4bec787221ce410e118ef26af9e802e2a.tar.gz
lufa-6e5df9e4bec787221ce410e118ef26af9e802e2a.tar.bz2
lufa-6e5df9e4bec787221ce410e118ef26af9e802e2a.zip
Update LEDs.h
Changed Led 5 and 4 to be compatible with the official firmware: https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/firmwares/atmegaxxu2/arduino-usbserial/Board/LEDs.h#L54-L57 Added TX and RX Led makro Fixed wrong Led logic: OUT and LOW results in LED on.
Diffstat (limited to 'LUFA/Drivers')
-rw-r--r--LUFA/Drivers/Board/AVR8/UNO/LEDs.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/LUFA/Drivers/Board/AVR8/UNO/LEDs.h b/LUFA/Drivers/Board/AVR8/UNO/LEDs.h
index 006c3a5dd..28c0747a3 100644
--- a/LUFA/Drivers/Board/AVR8/UNO/LEDs.h
+++ b/LUFA/Drivers/Board/AVR8/UNO/LEDs.h
@@ -44,8 +44,8 @@
*
* <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.4</td></tr>
- * <tr><td>LEDS_LED2</td><td>Yellow</td><td>TX</td><td>Low</td><td>PORTD.5</td></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>
*
* @{
@@ -70,16 +70,22 @@
/* 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. */
- #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 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__)
@@ -92,7 +98,7 @@
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)