kinetis/serial: Do not xmit when no chars to xmit

When there are no data in the TX buffer, we can avoid call to the
uart_xmitchars.

Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
This commit is contained in:
Jiri Vlasak
2026-03-25 12:04:40 +01:00
committed by Xiang Xiao
parent fd3e524c0f
commit 444073e370
+1 -1
View File
@@ -1288,7 +1288,7 @@ static int up_interrupts(int irq, void *context, void *arg)
* the TX data register.
*/
if ((s1 & UART_S1_TDRE) != 0)
if ((s1 & UART_S1_TDRE) != 0 && dev->xmit.head != dev->xmit.tail)
#endif
{
/* Process outgoing bytes */