diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2010-09-08 22:33:33 +0000 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2010-09-08 22:33:33 +0000 |
commit | f9a3b5cfa9b591096b80a7541323c4319da2d32d (patch) | |
tree | e371a9e83e28c3eeb7113b963c44cd11fe0135ee /cores/arduino/HardwareSerial.cpp | |
parent | 4bbd4f7448907ed0133ef737fc694751f9f97ea3 (diff) |
1280 -> 1280/2560.
Diffstat (limited to 'cores/arduino/HardwareSerial.cpp')
-rwxr-xr-x | cores/arduino/HardwareSerial.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp index 43322ae..e7ac21f 100755 --- a/cores/arduino/HardwareSerial.cpp +++ b/cores/arduino/HardwareSerial.cpp @@ -42,7 +42,7 @@ struct ring_buffer { ring_buffer rx_buffer = { { 0 }, 0, 0 }; -#if defined(__AVR_ATmega1280__) +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) ring_buffer rx_buffer1 = { { 0 }, 0, 0 }; ring_buffer rx_buffer2 = { { 0 }, 0, 0 }; ring_buffer rx_buffer3 = { { 0 }, 0, 0 }; @@ -62,7 +62,7 @@ inline void store_char(unsigned char c, ring_buffer *rx_buffer) } } -#if defined(__AVR_ATmega1280__) +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) SIGNAL(SIG_USART0_RECV) { @@ -229,7 +229,7 @@ HardwareSerial Serial(&rx_buffer, &UBRRH, &UBRRL, &UCSRA, &UCSRB, &UDR, RXEN, TX HardwareSerial Serial(&rx_buffer, &UBRR0H, &UBRR0L, &UCSR0A, &UCSR0B, &UDR0, RXEN0, TXEN0, RXCIE0, UDRE0, U2X0); #endif -#if defined(__AVR_ATmega1280__) +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) HardwareSerial Serial1(&rx_buffer1, &UBRR1H, &UBRR1L, &UCSR1A, &UCSR1B, &UDR1, RXEN1, TXEN1, RXCIE1, UDRE1, U2X1); HardwareSerial Serial2(&rx_buffer2, &UBRR2H, &UBRR2L, &UCSR2A, &UCSR2B, &UDR2, RXEN2, TXEN2, RXCIE2, UDRE2, U2X2); HardwareSerial Serial3(&rx_buffer3, &UBRR3H, &UBRR3L, &UCSR3A, &UCSR3B, &UDR3, RXEN3, TXEN3, RXCIE3, UDRE3, U2X3); |