/* Output a character in polled mode. 
If the hardware flow control is enabled then the handshake signal CTS has to be asserted in order to send a character. */
static void uart_ns16550_poll_out(const struct device *dev, unsigned char c)
/* Output a character in polled mode. 
If the hardware flow control is enabled then the handshake signal CTS has to be asserted in order to send a character. */
static void uart_ns16550_poll_out(const struct device *dev, unsigned char c)
{
	struct uart_ns16550_dev_data *data = dev->data;
	const struct uart_ns16550_device_config * const dev_cfg = dev->config;
	k_spinlock_key_t key = k_spin_lock(&data->lock);
	while ((ns16550_inbyte(dev_cfg, LSR(dev)) & LSR_THRE) == 0) {
	}
	ns16550_outbyte(dev_cfg, THR(dev), c);
	k_spin_unlock(&data->lock, key);
}