HAL_ChibiOS: invoke serial data event signal for non dma ports as well

This commit is contained in:
Siddharth Purohit 2019-01-04 18:02:56 +08:00 committed by Andrew Tridgell
parent e9047cc131
commit b5fbdc9888
1 changed files with 3 additions and 5 deletions

View File

@ -868,10 +868,6 @@ void UARTDriver::_timer_tick(void)
_readbuf.write(rx_bounce_buf, len);
receive_timestamp_update();
if (_wait.thread_ctx && _readbuf.available() >= _wait.n) {
chEvtSignal(_wait.thread_ctx, EVT_DATA);
}
if (_rts_is_active) {
update_rts_line();
}
@ -936,7 +932,9 @@ void UARTDriver::_timer_tick(void)
}
}
}
if (_wait.thread_ctx && _readbuf.available() >= _wait.n) {
chEvtSignal(_wait.thread_ctx, EVT_DATA);
}
if (unbuffered_writes) {
// now send pending bytes. If we are doing "unbuffered" writes
// then the send normally happens as soon as the bytes are