mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-01-11 13:01:30 +11:00
Change comment on baudrate calculation
This commit is contained in:
parent
8586f98c02
commit
c35358f475
|
@ -361,7 +361,8 @@ fn calculate_baudrate_dividers(
|
|||
wanted_baudrate: &Baud,
|
||||
frequency: &Hertz,
|
||||
) -> Result<(u16, u16), Error> {
|
||||
// baudrate_div = frequency * 8 / wanted_baudrate
|
||||
// See Chapter 4, Section 2 §7.1 from the datasheet for an explanation of how baudrate is
|
||||
// calculated
|
||||
let baudrate_div = frequency.integer()
|
||||
.checked_mul(8)
|
||||
.and_then(|r| r.checked_div(*wanted_baudrate.integer()))
|
||||
|
|
Loading…
Reference in a new issue