Skip to content

Commit 4c2af08

Browse files
committed
2 parents 1da7979 + 38bae05 commit 4c2af08

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

build/shared/lib/keywords.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ INTERNAL LITERAL2 AnalogReference RESERVED_WORD_2
2828
INTERNAL1V1 LITERAL2 AnalogReference RESERVED_WORD_2
2929
INTERNAL2V56 LITERAL2 AnalogReference RESERVED_WORD_2
3030
LED_BUILTIN LITERAL2 RESERVED_WORD_2
31+
LED_BUILTIN_RX LITERAL2 RESERVED_WORD_2
32+
LED_BUILTIN_TX LITERAL2 RESERVED_WORD_2
3133

3234
auto LITERAL2 RESERVED_WORD_2
3335
constexpr LITERAL2 RESERVED_WORD_2

build/shared/revisions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ARDUINO 1.6.7
2020
parseFloat also support parsing floats without a leading 0,
2121
Stream::find(char) added to SAM. Thanks @Chris--A.
2222
* Leonardo/Micro (and other atmega32u4 based boards) now have SerialUSB alias for Serial
23+
* Leonardo now has LED_BUILTIN_RX/TX definitions in variant file. Thanks @NicoHood
2324

2425
ARDUINO 1.6.6 - 2015.11.03
2526

hardware/arduino/avr/variants/leonardo/pins_arduino.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
#undef OCR2_6
8989
#undef OCR2_7
9090

91-
#define NUM_DIGITAL_PINS 30
91+
#define NUM_DIGITAL_PINS 31
9292
#define NUM_ANALOG_INPUTS 12
9393

9494
#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
@@ -100,6 +100,8 @@
100100
static const uint8_t SDA = 2;
101101
static const uint8_t SCL = 3;
102102
#define LED_BUILTIN 13
103+
#define LED_BUILTIN_RX 17
104+
#define LED_BUILTIN_TX 30
103105

104106
// Map SPI port to 'new' pins D14..D17
105107
static const uint8_t SS = 17;
@@ -131,6 +133,8 @@ static const uint8_t A11 = 29; // D12
131133
extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
132134
#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
133135

136+
#define digitalPinHasPWM(p) ((p) == 3 || (p) == 5 || (p) == 6 || (p) == 9 || (p) == 10 || (p) == 11 || (p) == 13)
137+
134138
#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
135139

136140
#ifdef ARDUINO_MAIN
@@ -171,8 +175,8 @@ extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
171175
// MOSI D16 PB2 MOSI,PCINT2
172176
// SS D17 PB0 RXLED,SS/PCINT0
173177
//
174-
// TXLED PD5
175-
// RXLED PB0
178+
// TXLED D30 PD5 XCK1
179+
// RXLED D17 PB0
176180
// HWB PE2 HWB
177181

178182
// these arrays map port names (e.g. port B) to the
@@ -243,6 +247,7 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
243247
PB, // D27 / D9 - A9 - PB5
244248
PB, // D28 / D10 - A10 - PB6
245249
PD, // D29 / D12 - A11 - PD6
250+
PD, // D30 / TX Led - PD5
246251
};
247252

248253
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
@@ -280,6 +285,7 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
280285
_BV(5), // D27 / D9 - A9 - PB5
281286
_BV(6), // D28 / D10 - A10 - PB6
282287
_BV(6), // D29 / D12 - A11 - PD6
288+
_BV(5), // D30 / TX Led - PD5
283289
};
284290

285291
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
@@ -317,6 +323,7 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
317323
NOT_ON_TIMER,
318324
NOT_ON_TIMER,
319325
NOT_ON_TIMER,
326+
NOT_ON_TIMER,
320327
};
321328

322329
const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {

0 commit comments

Comments
 (0)