I am relatively new to Zephyr RTOS and I am trying to understanding its ASYNC UART API capabilities better. I am trying to move processing away from my async uart callback to a different thread.
To do this, I am exploring using Zephyr ring buffer in byte mode to facilitate moving the UART data to a consumer thread from the UART callback. In the ring buffer documentation, it seems to indicate that we can use the ASYNC UART API to have the DMA directly write UART RX data into Zephyr ring buffer. It seems to imply this in bullet point 2) where it says "e.g. buffer written by DMA".
I might be misinterpreting this use case, so any clarification would be much appreciated. It makes me think something like the following is possible.
The alternative and more obvious approach to me seems to be adding data using ring_buf_put() when the callback with the UART_RX_RDY event is called.
Please let me know if you have any thoughts. Thank you for your help!
Best,
Sandesh