mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 22:20:01 +08:00
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user