diff options
| author | 1-rafael-1 <[email protected]> | 2025-05-02 23:51:28 +0200 |
|---|---|---|
| committer | 1-rafael-1 <[email protected]> | 2025-05-02 23:51:28 +0200 |
| commit | 3441e805070c7efb7cad20a84d1986e215b4de3d (patch) | |
| tree | 7bdc5ad9c015ad02e07ff45531b22095cabf2632 /tests/rp/src/bin | |
| parent | a33e7172f6bf7dc9590432dd62c2b71d0215d99d (diff) | |
first batch of changes after review
Diffstat (limited to 'tests/rp/src/bin')
| -rw-r--r-- | tests/rp/src/bin/overclock.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/rp/src/bin/overclock.rs b/tests/rp/src/bin/overclock.rs index e4845a55f..6c58a6b90 100644 --- a/tests/rp/src/bin/overclock.rs +++ b/tests/rp/src/bin/overclock.rs | |||
| @@ -14,7 +14,7 @@ use embassy_rp::clocks; | |||
| 14 | #[cfg(feature = "rp2040")] | 14 | #[cfg(feature = "rp2040")] |
| 15 | use embassy_rp::clocks::ClockConfig; | 15 | use embassy_rp::clocks::ClockConfig; |
| 16 | #[cfg(feature = "rp2040")] | 16 | #[cfg(feature = "rp2040")] |
| 17 | use embassy_rp::clocks::VoltageScale; | 17 | use embassy_rp::clocks::CoreVoltage; |
| 18 | use embassy_rp::config::Config; | 18 | use embassy_rp::config::Config; |
| 19 | use embassy_time::Instant; | 19 | use embassy_time::Instant; |
| 20 | use {defmt_rtt as _, panic_probe as _}; | 20 | use {defmt_rtt as _, panic_probe as _}; |
| @@ -31,15 +31,15 @@ async fn main(_spawner: Spawner) { | |||
| 31 | // Initialize with 200MHz clock configuration for RP2040, other chips will use default clock | 31 | // Initialize with 200MHz clock configuration for RP2040, other chips will use default clock |
| 32 | #[cfg(feature = "rp2040")] | 32 | #[cfg(feature = "rp2040")] |
| 33 | { | 33 | { |
| 34 | config.clocks = ClockConfig::at_sys_frequency_mhz(200); | 34 | config.clocks = ClockConfig::crystal_freq(200_000_000); |
| 35 | let voltage = config.clocks.voltage_scale.unwrap(); | 35 | let voltage = config.clocks.core_voltage; |
| 36 | assert!(matches!(voltage, VoltageScale::V1_15), "Expected voltage scale V1_15"); | 36 | assert!(matches!(voltage, CoreVoltage::V1_15), "Expected voltage scale V1_15"); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | let _p = embassy_rp::init(config); | 39 | let _p = embassy_rp::init(config); |
| 40 | 40 | ||
| 41 | // Test the system speed | ||
| 41 | let (time_elapsed, clk_sys_freq) = { | 42 | let (time_elapsed, clk_sys_freq) = { |
| 42 | // Test the system speed | ||
| 43 | let mut counter = 0; | 43 | let mut counter = 0; |
| 44 | let start = Instant::now(); | 44 | let start = Instant::now(); |
| 45 | while counter < COUNT_TO { | 45 | while counter < COUNT_TO { |
