aboutsummaryrefslogtreecommitdiff
path: root/examples/rp
diff options
context:
space:
mode:
author1-rafael-1 <[email protected]>2025-04-29 22:49:05 +0200
committer1-rafael-1 <[email protected]>2025-04-29 22:49:05 +0200
commit77e8bc9b28d6988b2703029679f290b351fc54a0 (patch)
tree87d6c6a693f6456f3be78232cbd592efeb2d9d80 /examples/rp
parent3a6dc910ffc66d4a30b89f299432b383271a719f (diff)
refactoring to have higher and lower level api
Diffstat (limited to 'examples/rp')
-rw-r--r--examples/rp/src/bin/overclock.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/examples/rp/src/bin/overclock.rs b/examples/rp/src/bin/overclock.rs
index db6c8f448..9027f1516 100644
--- a/examples/rp/src/bin/overclock.rs
+++ b/examples/rp/src/bin/overclock.rs
@@ -14,7 +14,18 @@ const COUNT_TO: i64 = 10_000_000;
14#[embassy_executor::main] 14#[embassy_executor::main]
15async fn main(_spawner: Spawner) -> ! { 15async fn main(_spawner: Spawner) -> ! {
16 // Set up for clock frequency of 200 MHz 16 // Set up for clock frequency of 200 MHz
17 let config = Config::new(ClockConfig::with_speed_mhz(200)); 17 // This will set all the necessary defaults including slightly raised voltage
18 // See embassy_rp::clocks::ClockConfig for more options, including full manual control
19 let config = Config::new(ClockConfig::at_sys_frequency_mhz(200));
20
21 // Show the voltage scale and brownout-detection for verification
22 info!("System core voltage: {}", Debug2Format(&config.clocks.voltage_scale));
23 // info!(
24 // "Brownout detection: {}",
25 // Debug2Format(&config.clocks.brownout_detection)
26 // );
27
28 // Initialize the peripherals
18 let p = embassy_rp::init(config); 29 let p = embassy_rp::init(config);
19 30
20 // Show CPU frequency for verification 31 // Show CPU frequency for verification