diff options
author | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2012-12-04 03:04:36 -0200 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2012-12-04 03:04:36 -0200 |
commit | a469e33abb1f02a007e7f119ac0126ce14e1e6a8 (patch) | |
tree | c0e706944343a3b9b37baeaf14993abec3da1099 /java/arduino/avrlibc-signals.patch | |
parent | 8ca8e3bf01034644a1487fd47d02c15aae3d5af9 (diff) | |
parent | 889356fb096ccf92488629067f8642969c91762f (diff) | |
download | abslibre-a469e33abb1f02a007e7f119ac0126ce14e1e6a8.tar.gz abslibre-a469e33abb1f02a007e7f119ac0126ce14e1e6a8.tar.bz2 abslibre-a469e33abb1f02a007e7f119ac0126ce14e1e6a8.zip |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/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(); + } |