Rev 3 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3 | Rev 9 | ||
---|---|---|---|
Line 8... | Line 8... | ||
8 | * USART driver layer |
8 | * USART driver layer |
9 | */ |
9 | */ |
10 | 10 | ||
11 | 11 | ||
12 | #include "serial.h" |
12 | #include "serial.h" |
- | 13 | #include "misc.h" // for activity detection flag on USART1 |
|
13 | 14 | ||
14 | /* workspaces for the USARTS being used */ |
15 | /* workspaces for the USARTS being used */ |
15 | usart_ctl uc1; |
16 | usart_ctl uc1; |
16 | usart_ctl uc2; |
17 | usart_ctl uc2; |
17 | 18 | ||
Line 243... | Line 244... | ||
243 | 244 | ||
244 | ///////////////////////////////////////////////////////// |
245 | ///////////////////////////////////////////////////////// |
245 | /// Moved from generated code to avoid crappy HAL handler |
246 | /// Moved from generated code to avoid crappy HAL handler |
246 | void USART1_IRQHandler(void) |
247 | void USART1_IRQHandler(void) |
247 | { |
248 | { |
- | 249 | // if we have received something on USART1 then we have activity from outside. |
|
- | 250 | if(__HAL_UART_GET_FLAG(&uc1,UART_FLAG_RXNE)) |
|
- | 251 | { |
|
- | 252 | NoSerialInCTR = 0; // Clear character timeout flag |
|
- | 253 | NoSerialIn = 0; |
|
- | 254 | } |
|
248 | UART_IRQHandler(&uc1); |
255 | UART_IRQHandler(&uc1); |
249 | } |
256 | } |
250 | 257 | ||
251 | void USART2_IRQHandler(void) |
258 | void USART2_IRQHandler(void) |
252 | { |
259 | { |