|
36 | 36 |
|
37 | 37 | #if defined(HAVE_HWSERIAL1) |
38 | 38 |
|
39 | | -#if defined(USART_RX_vect) |
40 | | - ISR(USART_RX_vect) |
| 39 | +#if defined(UART1_RX_vect) |
| 40 | +ISR(UART1_RX_vect) |
41 | 41 | #elif defined(USART1_RX_vect) |
42 | | - ISR(USART1_RX_vect) |
43 | | -#elif defined(USART_RXC_vect) |
44 | | - ISR(USART_RXC_vect) // ATmega8 |
| 42 | +ISR(USART1_RX_vect) |
45 | 43 | #else |
46 | | - #error "Don't know what the Data Received vector is called for the first UART" |
| 44 | +#error "Don't know what the Data Register Empty vector is called for Serial1" |
47 | 45 | #endif |
48 | | - { |
49 | | - Serial1._rx_complete_irq(); |
50 | | - } |
| 46 | +{ |
| 47 | + Serial1._rx_complete_irq(); |
| 48 | +} |
51 | 49 |
|
52 | 50 | #if defined(UART1_UDRE_vect) |
53 | 51 | ISR(UART1_UDRE_vect) |
54 | | -#elif defined(UART_UDRE_vect) |
55 | | -ISR(UART_UDRE_vect) |
56 | 52 | #elif defined(USART1_UDRE_vect) |
57 | 53 | ISR(USART1_UDRE_vect) |
58 | | -#elif defined(USART_UDRE_vect) |
59 | | -ISR(USART_UDRE_vect) |
60 | 54 | #else |
61 | | - #error "Don't know what the Data Register Empty vector is called for the first UART" |
| 55 | +#error "Don't know what the Data Register Empty vector is called for Serial1" |
62 | 56 | #endif |
63 | 57 | { |
64 | 58 | Serial1._tx_udr_empty_irq(); |
65 | 59 | } |
66 | 60 |
|
67 | | -#if defined(UBRRH) && defined(UBRRL) |
68 | | - HardwareSerial Serial1(&UBRRH, &UBRRL, &UCSRA, &UCSRB, &UCSRC, &UDR); |
69 | | -#else |
70 | | - HardwareSerial Serial1(&UBRR1H, &UBRR1L, &UCSR1A, &UCSR1B, &UCSR1C, &UDR1); |
71 | | -#endif |
| 61 | +HardwareSerial Serial1(&UBRR1H, &UBRR1L, &UCSR1A, &UCSR1B, &UCSR1C, &UDR1); |
72 | 62 |
|
73 | 63 | // Function that can be weakly referenced by serialEventRun to prevent |
74 | 64 | // pulling in this file if it's not otherwise used. |
|
0 commit comments