-
Notifications
You must be signed in to change notification settings - Fork 8.4k
drivers: uart: clarification of poll_out blocking duration #81358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: uart: clarification of poll_out blocking duration #81358
Conversation
The API docs state that the uart_poll_out is a blocking call, but it does not specify how long a call to this function should block the calling thread. This is described in the UART driver documentation. This patch clarifies the API docs and alignes it with the driver documentation. Signed-off-by: Hubert Miś <[email protected]>
| * function is a blocking call. | ||
| * register. It waits and blocks the calling thread otherwise. This | ||
| * function is a blocking call. It blocks the calling thread until the | ||
| * character is sent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't it block until the TX FIFO has space for the character, rather than until the character is sent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc I linked says "until the give character is sent". My intention is to unify these docs.
|
What is the benefit of blocking in poll out until byte is sent? |
|
I guess information for the API user when the byte is sent. I don't think there is any other function to poll for this information. |
|
Maybe let me add a little context. So the code would look like: According to the text from uart.rst, no additional waiting after the loop is required, because |
|
Maybe we are missing something like |
|
@nordic-krch can you clarify if your comment calls for a request for change or if you want to +1 to move this forward? Thanks! |
The API docs state that the uart_poll_out is a blocking call, but it does not specify how long a call to this function should block the calling thread. This is described in the UART driver documentation.
This patch clarifies the API docs and aligns it with the driver documentation.
ref
zephyr/doc/hardware/peripherals/uart.rst
Lines 18 to 20 in 1a5ae37