From 9c72c684d1446d36598c9ce628df41996420fb32 Mon Sep 17 00:00:00 2001 From: Rob Wells Date: Tue, 19 Aug 2025 19:02:20 +0100 Subject: [PATCH] rp: fix blocking I2C example regarding pull-up resistors This amends the blocking I2C example for embassy-rp. Commit bbc3e49 added a pull-up configuration and a comment that pull-ups were not enabled by default. This was made out-of-date by badcdcc, which ensured pull-ups were enabled by default to make the larger I2C configuration change non-breaking. This commit removes the (now-unnecessary) pull-up configuration, and adds a comment to clarify that the default I2C configuration enables pull-ups. --- examples/rp/src/bin/i2c_blocking.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/rp/src/bin/i2c_blocking.rs b/examples/rp/src/bin/i2c_blocking.rs index 6a57ded20..317921374 100644 --- a/examples/rp/src/bin/i2c_blocking.rs +++ b/examples/rp/src/bin/i2c_blocking.rs @@ -49,10 +49,8 @@ async fn main(_spawner: Spawner) { let scl = p.PIN_15; info!("set up i2c "); - let mut config = Config::default(); - // by default internal pullup resitors are disabled - config.sda_pullup = true; - config.scl_pullup = true; + // Default I2C config enables internal pull-up resistors. + let config = Config::default(); let mut i2c = i2c::I2c::new_blocking(p.I2C1, scl, sda, config); use mcp23017::*;