arduino / arduino/ArduinoCore-avr
Request adding Serial.writeIdle()
- Dominant language
- C
- Stars
- 1.5k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Request adding Serial.writeIdle() command;
returns 1 when no data remain in Serial TX buffer and the UART TX is idle,
returns 0 if not all serial data have been completely transmitted.
I don't see any function like this in the Serial reference ( https://www.arduino.cc/reference/en/language/functions/communication/serial/ ).
My goal for this function is to provide a non-blocking means to know when all the data I have sent to the TX UART have been completely transmitted by the TX UART, so that I can safely call Serial.end() and avoid prematurely stopping serial transmission. I'm using the UART TX output to control a low power RF transmitter (transmitter is active on HIGH control input) and want a way to know when I can safely turn off the UART TX output (and thus ensure that the transmitter is off).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Serial implementation in ArduinoCore-avr and compare its transmission behavior with the linked Serial reference. Verify that the requested command is non-blocking, reports both an empty TX buffer and an idle UART, and supports safely ending transmission.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100