|
STM32 RTOS 0.2.3
Bare-metal preemptive RTOS for STM32F446RE
|
UART driver: asynchronous configuration and blocking transfer. More...
Go to the source code of this file.
Functions | |
| DRIVER_MUST_CHECK DriverStatus_e | uartInit (UartRegisters_t *uart, uint32_t pclk_hz, uint32_t baud, uint32_t stop_bits, uint32_t parity_enable, uint32_t parity_select, uint32_t direction) |
| Configure an instance for asynchronous 8-bit operation and enable it. | |
| void | uartDeinit (UartRegisters_t *uart) |
| Return CR1, CR2, CR3, BRR and GTPR to their reset values (disabled). | |
| DRIVER_MUST_CHECK DriverStatus_e | uartFlush (const UartRegisters_t *uart, uint32_t timeout) |
| Wait until the last byte has left the shift register (SR.TC). | |
| DRIVER_MUST_CHECK DriverStatus_e | uartTransmitByte (UartRegisters_t *uart, uint8_t byte, uint32_t timeout) |
| Send one byte once DR is free (SR.TXE). | |
| DRIVER_MUST_CHECK DriverStatus_e | uartTransmit (UartRegisters_t *uart, const uint8_t *data, size_t length, uint32_t timeout) |
| Send a buffer and wait until the line is idle. | |
| DRIVER_MUST_CHECK DriverStatus_e | uartReceiveByte (UartRegisters_t *uart, uint8_t *byte, uint32_t timeout) |
| Receive one byte once SR.RXNE sets. | |
| DRIVER_MUST_CHECK DriverStatus_e | uartReceive (UartRegisters_t *uart, uint8_t *data, size_t length, uint32_t timeout) |
| Receive a buffer, one byte at a time. | |
UART driver: asynchronous configuration and blocking transfer.
115200 baud, 8N1 on USART2 (the NUCLEO's ST-LINK virtual COM port, PA2/PA3, AF7), with APB1 at 45 MHz:
Definition in file uart.h.