aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp/src/clocks.rs
diff options
context:
space:
mode:
authorRafael Bachmann <[email protected]>2024-03-18 23:28:58 +0100
committerRafael Bachmann <[email protected]>2024-03-18 23:28:58 +0100
commit255ed29853eb88bff2ee548c63fb4d0a6dfad7e8 (patch)
tree1e4141a01dc06d60378f0fa10c863f6f35660621 /embassy-rp/src/clocks.rs
parent6d9f87356bb523de6a17fc380f23c04ee66b38ce (diff)
fix minor clippy lints in embassy_rp
Diffstat (limited to 'embassy-rp/src/clocks.rs')
-rw-r--r--embassy-rp/src/clocks.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/embassy-rp/src/clocks.rs b/embassy-rp/src/clocks.rs
index 19232b801..b02f3796f 100644
--- a/embassy-rp/src/clocks.rs
+++ b/embassy-rp/src/clocks.rs
@@ -1,5 +1,4 @@
1//! Clock configuration for the RP2040 1//! Clock configuration for the RP2040
2use core::arch::asm;
3use core::marker::PhantomData; 2use core::marker::PhantomData;
4use core::sync::atomic::{AtomicU16, AtomicU32, Ordering}; 3use core::sync::atomic::{AtomicU16, AtomicU32, Ordering};
5 4
@@ -8,7 +7,6 @@ use pac::clocks::vals::*;
8 7
9use crate::gpio::sealed::Pin; 8use crate::gpio::sealed::Pin;
10use crate::gpio::AnyPin; 9use crate::gpio::AnyPin;
11use crate::pac::common::{Reg, RW};
12use crate::{pac, reset, Peripheral}; 10use crate::{pac, reset, Peripheral};
13 11
14// NOTE: all gpin handling is commented out for future reference. 12// NOTE: all gpin handling is commented out for future reference.
@@ -737,7 +735,7 @@ fn configure_pll(p: pac::pll::Pll, input_freq: u32, config: PllConfig) -> u32 {
737 assert!(config.refdiv >= 1 && config.refdiv <= 63); 735 assert!(config.refdiv >= 1 && config.refdiv <= 63);
738 assert!(ref_freq >= 5_000_000 && ref_freq <= 800_000_000); 736 assert!(ref_freq >= 5_000_000 && ref_freq <= 800_000_000);
739 let vco_freq = ref_freq.saturating_mul(config.fbdiv as u32); 737 let vco_freq = ref_freq.saturating_mul(config.fbdiv as u32);
740 assert!(vco_freq >= 750_000_000 && vco_freq <= 1800_000_000); 738 assert!(vco_freq >= 750_000_000 && vco_freq <= 1_800_000_000);
741 739
742 // Load VCO-related dividers before starting VCO 740 // Load VCO-related dividers before starting VCO
743 p.cs().write(|w| w.set_refdiv(config.refdiv as _)); 741 p.cs().write(|w| w.set_refdiv(config.refdiv as _));