They probably would be, but I'm swamped with work for the foreseeable future (aren't we all?). Most of the patches are rather simple fixes.
The RX FIFO patch adds a larger receive buffer for UART_RX_IDLE / rxchar_cb mode. It makes the driver less prone to overrun, and the system is not interrupted for each new character. Without the patch, the driver only provides a single character buffer.
It's used like this:
Code: Select all
static const UARTConfig cfg = {
uart_txend,
NULL,
NULL,
uart_rxdata,
uart_rxerr,
SERBOOT_BRATE,
0, /*cr1*/
0, /*cr2*/
0, /*cr3*/
ldr.rxfifo,
sizeof(ldr.rxfifo)
};
uartStart(MAIN_UART, &cfg);
Notice the additional struct members at the end. The buffer can be as large as required.
It's implemented using DMA circular buffer mode, DMA Transfer Complete and Half Transfer interrupts, and the USART IDLE interrupt. The receive buffer is drained (meaning, the rxchar_cb callback is called for each new character) when any of those interrupts fires. Perhaps the FIFO should be drained by a dedicated thread. Currently it's done in ISR context.
The patch wasn't thoroughly tested.
I've provided it for reference mostly, you can do whatever you like with the patches.