Hello Peter Doyle:
I guess you mean the KSDK examples. The examples you mentioned are structured as next:
- uart_blocking_example: This waits until the transfers initiated by UART_DRV_SendDataBlocking() are completed. This example uses interrupts, not polling.
- uart_non_blocking_example: In this example, there are calls to UART_DRV_SendData() and UART_DRV_ReceiveData(), but the application does not wait for the transfers (Tx or Rx) to complete. This example also uses interrupts.
- uart_polling_example: In this case, the interrupts are disabled and the application calls the API UART_HAL_SendDataPolling(), which works in a "blocking" way. This would be your "polling and blocking" case. There is not a similar example which is "poling and non blocking".
There are also examples using DMA (uart_edma_blocking and uart_edma_non_blocking).
The KSDK UART driver is based on interrupts, so you can see that the polling example is made with the UART HAL layer instead.
Just as stated by Mark, the driver examples are meant to show the basic configuration and usage of the KSDK platform (DRV and HAL APIs), but there is a lot more functionality in the UART peripheral itself. KSDK drivers intend to cover common use cases, but if the driver does not fit your requirements then you can either customize it or use the HAL layer directly.
I hope this clarifies a bit. Let me know if you have questions.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------