@@ -104,24 +104,16 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
104104#if !defined(USART0_RX_vect) && defined(USART1_RX_vect)
105105// do nothing - on the 32u4 the first USART is USART1
106106#else
107- #if !defined(USART_RX_vect) && !defined(SIG_USART0_RECV) && \
108- !defined (SIG_UART0_RECV) && !defined (USART0_RX_vect) && \
109- !defined (SIG_UART_RECV)
107+ #if !defined(USART_RX_vect) && !defined(USART0_RX_vect)
110108 #error "Don't know what the Data Received vector is called for the first UART"
111109#else
112110 void serialEvent () __attribute__((weak));
113111 void serialEvent () {}
114112 #define serialEvent_implemented
115113#if defined(USART_RX_vect)
116- SIGNAL (USART_RX_vect)
117- #elif defined(SIG_USART0_RECV)
118- SIGNAL (SIG_USART0_RECV)
119- #elif defined(SIG_UART0_RECV)
120- SIGNAL (SIG_UART0_RECV)
114+ ISR (USART_RX_vect)
121115#elif defined(USART0_RX_vect)
122- SIGNAL (USART0_RX_vect)
123- #elif defined(SIG_UART_RECV)
124- SIGNAL (SIG_UART_RECV)
116+ ISR (USART0_RX_vect)
125117#endif
126118 {
127119 #if defined(UDR0)
@@ -149,7 +141,7 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
149141 void serialEvent1 () __attribute__((weak));
150142 void serialEvent1 () {}
151143 #define serialEvent1_implemented
152- SIGNAL (USART1_RX_vect)
144+ ISR (USART1_RX_vect)
153145 {
154146 if (bit_is_clear (UCSR1A, UPE1)) {
155147 unsigned char c = UDR1;
@@ -158,15 +150,13 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
158150 unsigned char c = UDR1;
159151 };
160152 }
161- #elif defined(SIG_USART1_RECV)
162- #error SIG_USART1_RECV
163153#endif
164154
165155#if defined(USART2_RX_vect) && defined(UDR2)
166156 void serialEvent2 () __attribute__((weak));
167157 void serialEvent2 () {}
168158 #define serialEvent2_implemented
169- SIGNAL (USART2_RX_vect)
159+ ISR (USART2_RX_vect)
170160 {
171161 if (bit_is_clear (UCSR2A, UPE2)) {
172162 unsigned char c = UDR2;
@@ -175,15 +165,13 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
175165 unsigned char c = UDR2;
176166 };
177167 }
178- #elif defined(SIG_USART2_RECV)
179- #error SIG_USART2_RECV
180168#endif
181169
182170#if defined(USART3_RX_vect) && defined(UDR3)
183171 void serialEvent3 () __attribute__((weak));
184172 void serialEvent3 () {}
185173 #define serialEvent3_implemented
186- SIGNAL (USART3_RX_vect)
174+ ISR (USART3_RX_vect)
187175 {
188176 if (bit_is_clear (UCSR3A, UPE3)) {
189177 unsigned char c = UDR3;
@@ -192,8 +180,6 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
192180 unsigned char c = UDR3;
193181 };
194182 }
195- #elif defined(SIG_USART3_RECV)
196- #error SIG_USART3_RECV
197183#endif
198184
199185void serialEventRun (void )
0 commit comments