From 0fe57f592664fe94837d4627587c036384088a37 Mon Sep 17 00:00:00 2001 From: Adam Macdonald <72780006+twokilohertz@users.noreply.github.com> Date: Fri, 28 Feb 2025 20:48:05 +0000 Subject: [PATCH] Manually change I2C config. to use 400 MHz bus speed --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 80a4d72..de62c12 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,7 +24,8 @@ async fn main(_spawner: Spawner) { let sda = peripherals.PIN_4; let scl = peripherals.PIN_5; - let i2c_config = embassy_rp::i2c::Config::default(); // TODO: Frequency is 100 MHz by default, should be 400 MHz + let mut i2c_config = embassy_rp::i2c::Config::default(); // TODO: Frequency is 100 MHz by default, should be 400 MHz + i2c_config.frequency = 400_000u32; let i2c_bus = embassy_rp::i2c::I2c::new_blocking(peripherals.I2C0, scl, sda, i2c_config); embassy_time::Timer::after_millis(30).await; // SCD41 power-up delay