Skip to content

Commit

Permalink
fix(spi): baudrate calc
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed May 3, 2024
1 parent 9c8fabf commit e24981a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,8 @@ fn calculate_baud_rate(hclk: u32, clk: u32) -> BaudRate {
33..=64 => BaudRate::DIV_64,
65..=128 => BaudRate::DIV_128,
129..=256 => BaudRate::DIV_256,
// default to div256
// fallback to the lowest baudrate
0 => BaudRate::DIV_2,
_ => BaudRate::DIV_256,
}
}
Expand Down

0 comments on commit e24981a

Please sign in to comment.