Is the current uart driver missing an UART_TX_DONE event?
Posted: Fri Nov 02, 2018 11:04 pm
Hi. I need to send and receive data from UART asynchronously. In order make non-blocking uart_write_bytes() calls, I need to extract an event signaling the starvation of the TX ring buffer (or the TX fifo if 'tx_buffer_size' == 0), and pass it upstream, so that more data can be queued.
Among the eventd generated by the current driver implementation, there is nothing like a UART_TX_DONE.
I am unable to tap into the uart_rx_intr_handler_default() ISR and handle UART_TX_DONE_INT myself, because it's a private implementation and rightfully so.
I am wondering if there is the API has a way to extract a "TX done" event in a simple manner. I was considering launching a task for the sole purpose of calling uart_wait_tx_done() and generate an useful event upon return, but that is way overkill, massively slow and sacrifices RAM to another task for no good reason.
Thanks in advance for any suggestion.
Among the eventd generated by the current driver implementation, there is nothing like a UART_TX_DONE.
I am unable to tap into the uart_rx_intr_handler_default() ISR and handle UART_TX_DONE_INT myself, because it's a private implementation and rightfully so.
I am wondering if there is the API has a way to extract a "TX done" event in a simple manner. I was considering launching a task for the sole purpose of calling uart_wait_tx_done() and generate an useful event upon return, but that is way overkill, massively slow and sacrifices RAM to another task for no good reason.
Thanks in advance for any suggestion.