Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
playfulFence committed Feb 5, 2025
1 parent ba39c8d commit b617592
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions esp-hal/src/spi/master.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,11 +590,11 @@ impl Config {
// Maximum supported frequency is 80Mhz, minimum is about 70khz.
cfg_if::cfg_if! {
if #[cfg(esp32h2)] {
if self.frequency < HertzU32::kHz(70) || self.frequency > HertzU32::MHz(48) {
if self.frequency < Rate::from_khz(70) || self.frequency > Rate::from_mhz(48) {
return Err(ConfigError::UnsupportedFrequency);
}
} else {
if self.frequency < HertzU32::kHz(70) || self.frequency > HertzU32::MHz(80) {
if self.frequency < Rate::from_khz(70) || self.frequency > Rate::from_mhz(80) {
return Err(ConfigError::UnsupportedFrequency);
}
}
Expand Down
6 changes: 3 additions & 3 deletions esp-hal/src/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2488,7 +2488,7 @@ impl Info {
/ actual_baud as u64;
// We tolerate deviation of 1% from the desired baud value, as it never will be
// exactly the same
if deviation > 1 as u64 {
if deviation > 1_u64 {
return Err(ConfigError::UnachievableBaudrate);
}
}
Expand Down Expand Up @@ -2580,7 +2580,7 @@ impl Info {
/ actual_baud as u64;
// We tolerate deviation of 1% from the desired baud value, as it never will be
// exactly the same
if deviation > 1 as u64 {
if deviation > 1_u64 {
return Err(ConfigError::UnachievableBaudrate);
}
}
Expand Down Expand Up @@ -2626,7 +2626,7 @@ impl Info {
/ actual_baud as u64;
// We tolerate deviation of 1% from the desired baud value, as it never will be
// exactly the same
if deviation > 1 as u64 {
if deviation > 1_u64 {
return Err(ConfigError::UnachievableBaudrate);
}
}
Expand Down

0 comments on commit b617592

Please sign in to comment.