From 6e5df9e4bec787221ce410e118ef26af9e802e2a Mon Sep 17 00:00:00 2001 From: Nico Date: Tue, 24 Feb 2015 09:38:12 +0100 Subject: 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. --- LUFA/Drivers/Board/AVR8/UNO/LEDs.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'LUFA/Drivers/Board/AVR8') 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 @@ * * * - * - * + * + * *
NameColorInfoActive LevelPort Pin
LEDS_LED1YellowRXLowPORTD.4
LEDS_LED2YellowTXLowPORTD.5
LEDS_LED1YellowRXLowPORTD.5
LEDS_LED2YellowTXLowPORTD.4
* * @{ @@ -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) -- cgit v1.2.3 From 017d0d8f91456aaf6a129e51f333a42ec7a674fe Mon Sep 17 00:00:00 2001 From: Nico Date: Tue, 24 Feb 2015 09:42:31 +0100 Subject: Update Board.h Added reset lines --- LUFA/Drivers/Board/AVR8/UNO/Board.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'LUFA/Drivers/Board/AVR8') diff --git a/LUFA/Drivers/Board/AVR8/UNO/Board.h b/LUFA/Drivers/Board/AVR8/UNO/Board.h index b23f8d0fd..38e2cb053 100644 --- a/LUFA/Drivers/Board/AVR8/UNO/Board.h +++ b/LUFA/Drivers/Board/AVR8/UNO/Board.h @@ -66,6 +66,12 @@ /* Macros: */ /** Indicates the board has hardware LEDs mounted. */ #define BOARD_HAS_LEDS + + /** Pin that can reset the main MCU. */ + #define AVR_RESET_LINE_PORT PORTD + #define AVR_RESET_LINE_DDR DDRD + #define AVR_RESET_LINE_PIN PIND + #define AVR_RESET_LINE_MASK (1 << PD7) /* Disable C linkage for C++ Compilers: */ #if defined(__cplusplus) -- cgit v1.2.3