|
40 | 40 |
|
41 | 41 | #if defined(HAL_UART_MODULE_ENABLED) && !defined(HAL_UART_MODULE_ONLY) |
42 | 42 | #if !defined(HWSERIAL_NONE) && defined(SERIAL_UART_INSTANCE) |
43 | | - #if SERIAL_UART_INSTANCE == 0 |
| 43 | + #if SERIAL_UART_INSTANCE == 0 || SERIAL_UART_INSTANCE == 101 |
44 | 44 | #define ENABLE_HWSERIALLP1 |
45 | 45 | #if !defined(Serial) |
46 | 46 | #define Serial SerialLP1 |
|
164 | 164 | #endif |
165 | 165 | #endif |
166 | 166 | #if defined(ENABLE_HWSERIAL10) |
167 | | - #if defined(UART10_BASE) |
| 167 | + #if defined(USART10_BASE) || defined(UART10_BASE) |
168 | 168 | #define HAVE_HWSERIAL10 |
169 | 169 | #endif |
170 | 170 | #endif |
171 | 171 |
|
172 | | - extern void serialEvent1(void) __attribute__((weak)); |
173 | | - extern void serialEvent2(void) __attribute__((weak)); |
174 | | - extern void serialEvent3(void) __attribute__((weak)); |
175 | | - extern void serialEvent4(void) __attribute__((weak)); |
176 | | - extern void serialEvent5(void) __attribute__((weak)); |
177 | | - extern void serialEvent6(void) __attribute__((weak)); |
178 | | - extern void serialEvent7(void) __attribute__((weak)); |
179 | | - extern void serialEvent8(void) __attribute__((weak)); |
180 | | - extern void serialEvent9(void) __attribute__((weak)); |
181 | | - extern void serialEvent10(void) __attribute__((weak)); |
182 | | - extern void serialEventLP1(void) __attribute__((weak)); |
| 172 | + #if defined(HAVE_HWSERIAL1) |
| 173 | + extern void serialEvent1(void) __attribute__((weak)); |
| 174 | + #endif |
| 175 | + #if defined(HAVE_HWSERIAL2) |
| 176 | + extern void serialEvent2(void) __attribute__((weak)); |
| 177 | + #endif |
| 178 | + #if defined(HAVE_HWSERIAL3) |
| 179 | + extern void serialEvent3(void) __attribute__((weak)); |
| 180 | + #endif |
| 181 | + #if defined(HAVE_HWSERIAL4) |
| 182 | + extern void serialEvent4(void) __attribute__((weak)); |
| 183 | + #endif |
| 184 | + #if defined(HAVE_HWSERIAL5) |
| 185 | + extern void serialEvent5(void) __attribute__((weak)); |
| 186 | + #endif |
| 187 | + #if defined(HAVE_HWSERIAL6) |
| 188 | + extern void serialEvent6(void) __attribute__((weak)); |
| 189 | + #endif |
| 190 | + #if defined(HAVE_HWSERIAL7) |
| 191 | + extern void serialEvent7(void) __attribute__((weak)); |
| 192 | + #endif |
| 193 | + #if defined(HAVE_HWSERIAL8) |
| 194 | + extern void serialEvent8(void) __attribute__((weak)); |
| 195 | + #endif |
| 196 | + #if defined(HAVE_HWSERIAL9) |
| 197 | + extern void serialEvent9(void) __attribute__((weak)); |
| 198 | + #endif |
| 199 | + #if defined(HAVE_HWSERIAL10) |
| 200 | + extern void serialEvent10(void) __attribute__((weak)); |
| 201 | + #endif |
| 202 | + #if defined(HAVE_HWSERIALLP1) |
| 203 | + extern void serialEventLP1(void) __attribute__((weak)); |
| 204 | + #endif |
183 | 205 | #endif /* HAL_UART_MODULE_ENABLED && !HAL_UART_MODULE_ONLY */ |
184 | 206 |
|
185 | 207 | extern void serialEventRun(void); |
|
0 commit comments