-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Adds HardwareSerial::setRxTimeout() #6397
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
Merged
me-no-dev
merged 18 commits into
espressif:master
from
gonzabrusco:uart_onreceive_timeout
Mar 28, 2022
Merged
Changes from 10 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
af0dabe
Adds HardwareSerial::onReceiveTimeout()
gonzabrusco ffe0882
Merge branch 'master' into uart_onreceive_timeout
SuGlider fa717e7
Fixed typo
gonzabrusco 22c5c71
Merge branch 'master' into uart_onreceive_timeout
SuGlider fbc0734
Merge branch 'espressif:master' into uart_onreceive_timeout
gonzabrusco 951ad87
Changes requested
gonzabrusco 8db2400
Fix eventQueueReset
gonzabrusco 1aff6b1
Changed _onReceiveTimeout to _rxTimeout for consistency
gonzabrusco 42fe78f
Uniform uart_set_rx_timeout condition
gonzabrusco 83ff56d
test _uart not NULL in eventQueueReset()
SuGlider be50818
revert last commit - no need for it
SuGlider 281ae37
Merge branch 'master' into uart_onreceive_timeout
SuGlider 807d750
adds onReceive() parameter
SuGlider d5de62c
Adds onReceive() parameter for timeout only
SuGlider c1b08e8
Adds back setRxTimeout()
SuGlider 20ecdae
Adds setRxTimeout()
SuGlider 5574fc4
Merge branch 'master' into uart_onreceive_timeout
SuGlider e67d1d2
CI Syntax error - "," missing
SuGlider File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This shall not be here. It shall be only in the
setRxTimeout(...)
API function.It is enforcing timeout usage to the sketch. That shall be optional.
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.
As I said before. The timeout behaviour is the default as per IDF (10 symbols defined in UART_TOUT_THRESH_DEFAULT). I think this is needed because the user could call setRxTimeout before or after the begin() . This is the same principle as you took with onReceive(). This is because uart_set_rx_timeout should be called once the uart is initialized.
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.
OK. I agree. Let's set the default always.