From 225eabb449815cdb7f9b88f2839e93af8c87a5b2 Mon Sep 17 00:00:00 2001 From: "Jonathan Pallant (42 Technology)" Date: Mon, 27 Sep 2021 18:42:36 +0100 Subject: [PATCH] Use peripheral clock to describe the clock signal given to peripherals. --- boards/pro_micro_rp2040/examples/pro_micro_rainbow.rs | 2 +- rp2040-hal/examples/i2c.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/pro_micro_rp2040/examples/pro_micro_rainbow.rs b/boards/pro_micro_rp2040/examples/pro_micro_rainbow.rs index 03ec2a3..dd9a094 100644 --- a/boards/pro_micro_rp2040/examples/pro_micro_rainbow.rs +++ b/boards/pro_micro_rp2040/examples/pro_micro_rainbow.rs @@ -80,7 +80,7 @@ fn main() -> ! { 25, pac.PIO0, &mut pac.RESETS, - clocks.system_clock.freq(), + clocks.peripheral_clock.freq(), timer.count_down(), ); diff --git a/rp2040-hal/examples/i2c.rs b/rp2040-hal/examples/i2c.rs index 8526217..f77bfc1 100644 --- a/rp2040-hal/examples/i2c.rs +++ b/rp2040-hal/examples/i2c.rs @@ -91,7 +91,7 @@ fn main() -> ! { scl_pin, // Try `not_an_scl_pin` here 400.kHz(), &mut pac.RESETS, - clocks.system_clock, + clocks.peripheral_clock, ); // Write three bytes to the I²C device with 7-bit address 0x2C