diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-12-04 10:07:37 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-12-04 10:07:37 -0300 |
commit | 5c50391d339853dc328a3e7f35456773f59adb31 (patch) | |
tree | 1096580608d7c8d0213bff15d6e9113964e5afbe /java/arduino/avrlibc-signals.patch | |
parent | 1930acb377d623fef168808f189ca5c0cac9bf4d (diff) | |
parent | c28e0105b720878da5c3e6a65eb49488c21a08aa (diff) | |
download | abslibre-5c50391d339853dc328a3e7f35456773f59adb31.tar.gz abslibre-5c50391d339853dc328a3e7f35456773f59adb31.tar.bz2 abslibre-5c50391d339853dc328a3e7f35456773f59adb31.zip |
Merge branch 'master' of ssh://gparabola/srv/git/abslibre
Diffstat (limited to 'java/arduino/avrlibc-signals.patch')
-rw-r--r-- | java/arduino/avrlibc-signals.patch | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/java/arduino/avrlibc-signals.patch b/java/arduino/avrlibc-signals.patch new file mode 100644 index 000000000..d9c743cc6 --- /dev/null +++ b/java/arduino/avrlibc-signals.patch @@ -0,0 +1,87 @@ +diff -ruN arduino-1.0.2.orig/hardware/arduino/cores/arduino/HardwareSerial.cpp arduino-1.0.2/hardware/arduino/cores/arduino/HardwareSerial.cpp +--- arduino-1.0.2.orig/hardware/arduino/cores/arduino/HardwareSerial.cpp 2012-11-04 16:29:10.000000000 -0500 ++++ arduino-1.0.2/hardware/arduino/cores/arduino/HardwareSerial.cpp 2012-12-03 15:35:06.000000000 -0500 +@@ -89,9 +89,7 @@ + #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) + #error "Don't know what the Data Received vector is called for the first UART" + #else + void serialEvent() __attribute__((weak)); +@@ -99,14 +97,8 @@ + #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) + #elif defined(USART0_RX_vect) + SIGNAL(USART0_RX_vect) +-#elif defined(SIG_UART_RECV) +- SIGNAL(SIG_UART_RECV) + #endif + { + #if defined(UDR0) +@@ -143,8 +135,6 @@ + unsigned char c = UDR1; + }; + } +-#elif defined(SIG_USART1_RECV) +- #error SIG_USART1_RECV + #endif + + #if defined(USART2_RX_vect) && defined(UDR2) +@@ -160,8 +150,6 @@ + unsigned char c = UDR2; + }; + } +-#elif defined(SIG_USART2_RECV) +- #error SIG_USART2_RECV + #endif + + #if defined(USART3_RX_vect) && defined(UDR3) +@@ -177,8 +165,6 @@ + unsigned char c = UDR3; + }; + } +-#elif defined(SIG_USART3_RECV) +- #error SIG_USART3_RECV + #endif + + void serialEventRun(void) +diff -ruN arduino-1.0.2.orig/hardware/arduino/cores/arduino/HardwareSerial.h arduino-1.0.2/hardware/arduino/cores/arduino/HardwareSerial.h +--- arduino-1.0.2.orig/hardware/arduino/cores/arduino/HardwareSerial.h 2012-11-04 16:29:10.000000000 -0500 ++++ arduino-1.0.2/hardware/arduino/cores/arduino/HardwareSerial.h 2012-12-03 15:35:06.000000000 -0500 +@@ -126,6 +126,15 @@ + #endif + #endif + ++/* ++ * on ATmega8, the uart and its bits are not numbered, so there is no "TXC0" ++ * definition. It is slightly cleaner to define this here instead of having ++ * conditional code in the cpp module. ++ */ ++#if !defined(TXC0) ++#define TXC0 TXC ++#endif ++ + extern void serialEventRun(void) __attribute__((weak)); + + #endif +diff -ruN arduino-1.0.2.orig/hardware/arduino/cores/arduino/WInterrupts.c arduino-1.0.2/hardware/arduino/cores/arduino/WInterrupts.c +--- arduino-1.0.2.orig/hardware/arduino/cores/arduino/WInterrupts.c 2012-11-04 16:29:11.000000000 -0500 ++++ arduino-1.0.2/hardware/arduino/cores/arduino/WInterrupts.c 2012-12-03 15:37:08.000000000 -0500 +@@ -314,7 +314,7 @@ + #endif + + /* +-SIGNAL(SIG_2WIRE_SERIAL) { ++ISR(TWI_vect) { + if(twiIntFunc) + twiIntFunc(); + } |