Add ClockError enum and update system_freq to return Result for error handling

This commit is contained in:
1-rafael-1
2025-05-12 21:33:47 +02:00
parent 133500167c
commit 79e452922a
4 changed files with 50 additions and 22 deletions

View File

@@ -20,7 +20,7 @@ async fn main(_spawner: Spawner) {
let mut config = Config::default();
// Initialize with 200MHz clock configuration
config.clocks = ClockConfig::system_freq(200_000_000);
config.clocks = ClockConfig::system_freq(200_000_000).unwrap();
// if we are rp235x, we need to manually set the core voltage. rp2040 should do this automatically
#[cfg(feature = "rp235xb")]