fix(st): flush UART at the end of uart_read()

Add a flush to ensure that the programmer get time to read the last
command sent.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ic1f718d2754f27945f12c04563663b46274810a7
This commit is contained in:
Yann Gautier 2023-04-07 11:17:09 +02:00
parent 2171bd9511
commit a9cb7d002d

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, STMicroelectronics - All Rights Reserved
* Copyright (c) 2021-2023, STMicroelectronics - All Rights Reserved
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -481,6 +481,8 @@ static int uart_read(uint8_t id, uintptr_t buffer, size_t length)
}
}
stm32_uart_flush(&handle.uart);
return 0;
}