21 #include "../lib/circular_buffer.h" 23 #define USART_RX_Pin GPIO_Pin_5 24 #define USART_RX_PinSource GPIO_PinSource5 25 #define USART_RX_Port GPIOD 26 #define USART_TX_Pin GPIO_Pin_6 27 #define USART_TX_PinSource GPIO_PinSource6 28 #define USART_TX_Port GPIOD 30 #define USART_PC_COMM USART2 // UART peripheral used for the comm with the PC. void uart_SendByteAsync(uint8_t data)
Asynchronously sends the given byte through the UART bus.
Definition: uart.c:224
void uart_FlushTx(void)
Start the DMA to send the bytes waiting in the intermediate buffer.
Definition: uart.c:299
cb_CircularBuffer * uart_GetRxQueue(void)
Gets the user-accessible queue of the received bytes.
Definition: uart.c:175
void uart_Init(void)
Initializes the UART module.
Definition: uart.c:46
Circular buffer structure.
Definition: circular_buffer.h:37
void(* uart_rxByteHandlerFunc)(uint8_t rxByte)
Definition: uart.h:54
void uart_SendBytesAsync(uint8_t *data, int length)
Asynchronously sends the given bytes through the UART bus.
Definition: uart.c:258
void uart_Step(void)
Copies the received bytes into the user-accessible queue. Reads all the available bytes in the DMA RX...
Definition: uart.c:146