diff options
Diffstat (limited to 'uart/stm32_uart.h')
| -rw-r--r-- | uart/stm32_uart.h | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/uart/stm32_uart.h b/uart/stm32_uart.h index 08f93d1..c4ba582 100644 --- a/uart/stm32_uart.h +++ b/uart/stm32_uart.h @@ -44,4 +44,10 @@ template <typename T>  class STM32_UART_t : public mmio_ptr<T> {      public:          using mmio_ptr<T>::ptr; + +	void write_blocking(uint8_t data) const { +		// wait for TXE/TXFNF +		while (!(ptr()->ISR & (1<<7))); +		ptr()->TDR = data; +	}  };  | 
