@@ -104,24 +104,16 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
104
104
#if !defined(USART0_RX_vect) && defined(USART1_RX_vect)
105
105
// do nothing - on the 32u4 the first USART is USART1
106
106
#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)
110
108
#error "Don't know what the Data Received vector is called for the first UART"
111
109
#else
112
110
void serialEvent () __attribute__((weak));
113
111
void serialEvent () {}
114
112
#define serialEvent_implemented
115
113
#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)
121
115
#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)
125
117
#endif
126
118
{
127
119
#if defined(UDR0)
@@ -149,7 +141,7 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
149
141
void serialEvent1 () __attribute__((weak));
150
142
void serialEvent1 () {}
151
143
#define serialEvent1_implemented
152
- SIGNAL (USART1_RX_vect)
144
+ ISR (USART1_RX_vect)
153
145
{
154
146
if (bit_is_clear (UCSR1A, UPE1)) {
155
147
unsigned char c = UDR1;
@@ -158,15 +150,13 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
158
150
unsigned char c = UDR1;
159
151
};
160
152
}
161
- #elif defined(SIG_USART1_RECV)
162
- #error SIG_USART1_RECV
163
153
#endif
164
154
165
155
#if defined(USART2_RX_vect) && defined(UDR2)
166
156
void serialEvent2 () __attribute__((weak));
167
157
void serialEvent2 () {}
168
158
#define serialEvent2_implemented
169
- SIGNAL (USART2_RX_vect)
159
+ ISR (USART2_RX_vect)
170
160
{
171
161
if (bit_is_clear (UCSR2A, UPE2)) {
172
162
unsigned char c = UDR2;
@@ -175,15 +165,13 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
175
165
unsigned char c = UDR2;
176
166
};
177
167
}
178
- #elif defined(SIG_USART2_RECV)
179
- #error SIG_USART2_RECV
180
168
#endif
181
169
182
170
#if defined(USART3_RX_vect) && defined(UDR3)
183
171
void serialEvent3 () __attribute__((weak));
184
172
void serialEvent3 () {}
185
173
#define serialEvent3_implemented
186
- SIGNAL (USART3_RX_vect)
174
+ ISR (USART3_RX_vect)
187
175
{
188
176
if (bit_is_clear (UCSR3A, UPE3)) {
189
177
unsigned char c = UDR3;
@@ -192,8 +180,6 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
192
180
unsigned char c = UDR3;
193
181
};
194
182
}
195
- #elif defined(SIG_USART3_RECV)
196
- #error SIG_USART3_RECV
197
183
#endif
198
184
199
185
void serialEventRun (void )
0 commit comments