aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/HardwareSerial.cpp
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2013-04-03 13:51:04 +0200
committerCristian Maglie <c.maglie@bug.st>2013-04-03 13:51:04 +0200
commitee90e68e86dd61d86f5d17b69080338328765b22 (patch)
treee620c0edc2690ab789b665e567910640597aa6fe /cores/arduino/HardwareSerial.cpp
parent0ecdc5ebc96ad4c7c548c438a03d9ce00679db8b (diff)
parentf50c307be280dc6ece9e70c43b301c1db36291a0 (diff)
Merged 1.0.5
Merge remote-tracking branch 'arduino/master' into ide-1.5.x Conflicts: app/src/processing/app/Base.java build/shared/revisions.txt hardware/arduino/avr/cores/arduino/malloc.c hardware/arduino/cores/arduino/avr-libc/malloc.c hardware/arduino/cores/arduino/malloc.c todo.txt
Diffstat (limited to 'cores/arduino/HardwareSerial.cpp')
-rw-r--r--cores/arduino/HardwareSerial.cpp29
1 files changed, 9 insertions, 20 deletions
diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp
index 794a7be..eb2365f 100644
--- a/cores/arduino/HardwareSerial.cpp
+++ b/cores/arduino/HardwareSerial.cpp
@@ -104,24 +104,19 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
#if !defined(USART0_RX_vect) && defined(USART1_RX_vect)
// do nothing - on the 32u4 the first USART is USART1
#else
-#if !defined(USART_RX_vect) && !defined(SIG_USART0_RECV) && \
- !defined(SIG_UART0_RECV) && !defined(USART0_RX_vect) && \
- !defined(SIG_UART_RECV)
+#if !defined(USART_RX_vect) && !defined(USART0_RX_vect) && \
+ !defined(USART_RXC_vect)
#error "Don't know what the Data Received vector is called for the first UART"
#else
void serialEvent() __attribute__((weak));
void serialEvent() {}
#define serialEvent_implemented
#if defined(USART_RX_vect)
- SIGNAL(USART_RX_vect)
-#elif defined(SIG_USART0_RECV)
- SIGNAL(SIG_USART0_RECV)
-#elif defined(SIG_UART0_RECV)
- SIGNAL(SIG_UART0_RECV)
+ ISR(USART_RX_vect)
#elif defined(USART0_RX_vect)
- SIGNAL(USART0_RX_vect)
-#elif defined(SIG_UART_RECV)
- SIGNAL(SIG_UART_RECV)
+ ISR(USART0_RX_vect)
+#elif defined(USART_RXC_vect)
+ ISR(USART_RXC_vect) // ATmega8
#endif
{
#if defined(UDR0)
@@ -149,7 +144,7 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
void serialEvent1() __attribute__((weak));
void serialEvent1() {}
#define serialEvent1_implemented
- SIGNAL(USART1_RX_vect)
+ ISR(USART1_RX_vect)
{
if (bit_is_clear(UCSR1A, UPE1)) {
unsigned char c = UDR1;
@@ -158,15 +153,13 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
unsigned char c = UDR1;
};
}
-#elif defined(SIG_USART1_RECV)
- #error SIG_USART1_RECV
#endif
#if defined(USART2_RX_vect) && defined(UDR2)
void serialEvent2() __attribute__((weak));
void serialEvent2() {}
#define serialEvent2_implemented
- SIGNAL(USART2_RX_vect)
+ ISR(USART2_RX_vect)
{
if (bit_is_clear(UCSR2A, UPE2)) {
unsigned char c = UDR2;
@@ -175,15 +168,13 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
unsigned char c = UDR2;
};
}
-#elif defined(SIG_USART2_RECV)
- #error SIG_USART2_RECV
#endif
#if defined(USART3_RX_vect) && defined(UDR3)
void serialEvent3() __attribute__((weak));
void serialEvent3() {}
#define serialEvent3_implemented
- SIGNAL(USART3_RX_vect)
+ ISR(USART3_RX_vect)
{
if (bit_is_clear(UCSR3A, UPE3)) {
unsigned char c = UDR3;
@@ -192,8 +183,6 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
unsigned char c = UDR3;
};
}
-#elif defined(SIG_USART3_RECV)
- #error SIG_USART3_RECV
#endif
void serialEventRun(void)