What is the intended design of higher-level code using the driver? Will it operate on individual characters or bytes as they come in? Or does it make more sense for the higher-level code to batch transfers into blocks/frames of bytes?
Queue-based drivers are very useful when dealing with unknown amounts (or streams) of data that can come in at any point in time. They are also a very natural fit for code that processes individual bytes—uartPrintOutTask was a good example of this:
while(1) { xQueueReceive(uart2_BytesReceived, &nextByte, portMAX_DELAY); //do something with the byte received SEGGER_SYSVIEW_PrintfHost("%c", nextByte); }
While ring-buffer implementations (such as the one in the preceding code) ...