uart_stm32: Fix conflit between poll_out and irq API

A lock was added to manage situation where the API poll_out and irq API
are used in same time.

Signed-off-by: Julien D'ascenzio <julien.dascenzio@paratronic.fr>
This commit is contained in:
Julien D'ascenzio 2021-11-08 12:47:25 +01:00 committed by Anas Nashif
commit d42cef17b0
2 changed files with 17 additions and 4 deletions

View file

@ -58,6 +58,7 @@ struct uart_stm32_data {
uint32_t baud_rate;
/* clock device */
const struct device *clock;
atomic_t tx_lock;
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
uart_irq_callback_user_data_t user_cb;
void *user_data;