Skip to content

Commit 6d8476a

Browse files
Bekken, Kristian_saxrudWalberg, Irun
authored andcommitted
Updated Serial library to facilitate bug-fix in newest device header-file
1 parent 4760dac commit 6d8476a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

variants/uno2018/pins_arduino.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ static const uint8_t SCL = PIN_WIRE_SCL;
5757
// Mapped to HWSERIAL0 in Serial library
5858
#define HWSERIAL0 (&USART1)
5959
//!!BUG in device header file. The RXC and DRE vectors are swapped!!
60-
#define HWSERIAL0_DRE_VECTOR (USART1_RXC_vect)
61-
#define HWSERIAL0_RXC_VECTOR (USART1_DRE_vect)
60+
#define HWSERIAL0_DRE_VECTOR (USART1_DRE_vect)
61+
#define HWSERIAL0_RXC_VECTOR (USART1_RXC_vect)
6262
#define PIN_WIRE_HWSERIAL0_RX (0)
6363
#define PIN_WIRE_HWSERIAL0_TX (1)
6464

@@ -67,8 +67,8 @@ static const uint8_t SCL = PIN_WIRE_SCL;
6767
// Mapped to HWSERIAL1 in Serial library
6868
#define HWSERIAL1 (&USART3)
6969
//!!BUG in device header file. The RXC and DRE vectors are swapped!!
70-
#define HWSERIAL1_DRE_VECTOR (USART3_RXC_vect)
71-
#define HWSERIAL1_RXC_VECTOR (USART3_DRE_vect)
70+
#define HWSERIAL1_DRE_VECTOR (USART3_DRE_vect)
71+
#define HWSERIAL1_RXC_VECTOR (USART3_RXC_vect)
7272
#define PIN_WIRE_HWSERIAL1_RX (26)
7373
#define PIN_WIRE_HWSERIAL1_TX (27)
7474

@@ -77,8 +77,8 @@ static const uint8_t SCL = PIN_WIRE_SCL;
7777
// Mapped to HWSERIAL2 in Serial library
7878
#define HWSERIAL2 (&USART0)
7979
//!!BUG in device header file. The RXC and DRE vectors are swapped!!
80-
#define HWSERIAL2_DRE_VECTOR (USART0_RXC_vect)
81-
#define HWSERIAL2_RXC_VECTOR (USART0_DRE_vect)
80+
#define HWSERIAL2_DRE_VECTOR (USART0_DRE_vect)
81+
#define HWSERIAL2_RXC_VECTOR (USART0_RXC_vect)
8282
#define PIN_WIRE_HWSERIAL2_RX (23)
8383
#define PIN_WIRE_HWSERIAL2_TX (24)
8484

@@ -339,7 +339,9 @@ const uint8_t PROGMEM digital_pin_to_timer[] = {
339339
//
340340
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
341341
// pins are NOT connected to anything by default.
342-
#define SERIAL_PORT_MONITOR Serial
343-
#define SERIAL_PORT_HARDWARE Serial
342+
#define SERIAL_PORT_MONITOR Serial
343+
#define SERIAL_PORT_HARDWARE Serial
344+
#define SERIAL_PORT_USBVIRTUAL Serial1
345+
#define SERIAL_PORT_HARDWARE_OPEN Serial2
344346

345347
#endif

0 commit comments

Comments
 (0)