-
Notifications
You must be signed in to change notification settings - Fork 207
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
Fix UART to handle CPU/APB clock changes #808
Conversation
e92d74c
to
344d9d1
Compare
344d9d1
to
ef96277
Compare
ef96277
to
79549a2
Compare
} | ||
use crate::gpio::*; | ||
// not real, just to satify the type | ||
type Pins<'a> = TxRxPins<'a, GpioPin<Output<PushPull>, 2>, GpioPin<Input<Floating>, 0>>; |
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.
If anyone has a better idea of how to satisfy this let me know.
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.
LGTM!
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.
LGTM, thanks!
* Ensure that uart is configured to account for clock changes, not just boot defaults * fix examples * changelog --------- Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
For the ESP32 and ESP32-S2, baud rate can be affected by CPU speed, which was causing issues in the stub: esp-rs/esp-flasher-stub#29 ( and perhaps some esp-wifi projects?).
new
now takes a reference to the CPU clock and adjusts its baud calculations accordingly.Must
errors
orwarnings
.cargo fmt
was run.CHANGELOG.md
in the proper section.Nice to have