drivers: serial: stm32 UART driver do not start Rx timer if null
This commit is optimizing the uart isr execution to avoid starting the Rx timeout if it is null. In anycase the async_timer_start function is checking the tiemout value. This will just save some execution lines. Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
939b274507
commit
0300b34cf0
1 changed files with 4 additions and 4 deletions
|
@ -1024,12 +1024,12 @@ static void uart_stm32_isr(const struct device *dev)
|
|||
|
||||
LOG_DBG("idle interrupt occurred");
|
||||
|
||||
/* Start the RX timer */
|
||||
async_timer_start(&data->dma_rx.timeout_work,
|
||||
data->dma_rx.timeout);
|
||||
|
||||
if (data->dma_rx.timeout == 0) {
|
||||
uart_stm32_dma_rx_flush(dev);
|
||||
} else {
|
||||
/* Start the RX timer not null */
|
||||
async_timer_start(&data->dma_rx.timeout_work,
|
||||
data->dma_rx.timeout);
|
||||
}
|
||||
} else if (LL_USART_IsEnabledIT_TC(config->usart) &&
|
||||
LL_USART_IsActiveFlag_TC(config->usart)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue