-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Fixes inconsistencies and adds extended HardwareSerial examples #7412
Merged
Conversation
This file contains 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 was referenced Nov 20, 2022
The headline is missleading. It is not just adding examples. |
Changed the "1-by-1" Serial only when baud rate is 57600 or lower.
@me-no-dev @P-R-O-C-H-Y |
me-no-dev
approved these changes
Dec 21, 2022
P-R-O-C-H-Y
approved these changes
Dec 21, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: Peripherals API
Relates to peripheral's APIs.
Peripheral: UART
Type: Example
Issue is related to specific example.
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.
Description of Change
This PR adds some examples that use API extensions to HardwareSerial, implemented to better controls UART communication using ESP32 Arduino.
HardwareSerial changes:
UART FIFO Full will depend on the baud rate.
For lower or equal to 57600 baud, it will force to emulate byte-by-byte reading on UART ISR.
For higher baud rate, it will keep IDF default of 120 bytes for FIFO FULL Interrupt.
The FIFO Full parameter can also be changed by the application at any time using
HardwareSerial::setRxFIFOFull(uint8_t fifoBytes)
It also fixes some inconsistencies found when using the examples.
Tests scenarios
The examples have been tested using ESP32, ESP32S2, ESP32S3 and ESP32C3.
Related links
#6921
#6689
#6849