From bbc3e49c585a2bf58091add9aeac3628d9044297 Mon Sep 17 00:00:00 2001 From: erwin Date: Mon, 18 Aug 2025 12:16:30 +0200 Subject: Add configurable internal pullups for rp i2c - Example updated to demonstrate enabling internal pullups - Add `sda_pullup` and `scl_pullup` fields to I2C Config --- examples/rp/src/bin/i2c_blocking.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'examples/rp') diff --git a/examples/rp/src/bin/i2c_blocking.rs b/examples/rp/src/bin/i2c_blocking.rs index c9c8a2760..6a57ded20 100644 --- a/examples/rp/src/bin/i2c_blocking.rs +++ b/examples/rp/src/bin/i2c_blocking.rs @@ -49,7 +49,11 @@ async fn main(_spawner: Spawner) { let scl = p.PIN_15; info!("set up i2c "); - let mut i2c = i2c::I2c::new_blocking(p.I2C1, scl, sda, Config::default()); + let mut config = Config::default(); + // by default internal pullup resitors are disabled + config.sda_pullup = true; + config.scl_pullup = true; + let mut i2c = i2c::I2c::new_blocking(p.I2C1, scl, sda, config); use mcp23017::*; -- cgit