Skip to content

Commit d65a507

Browse files
authored
Merge pull request #4569 from robjwells/rp-i2c-pull-example
rp: fix blocking I2C example regarding pull-up resistors
2 parents 63ade38 + 9c72c68 commit d65a507

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/rp/src/bin/i2c_blocking.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ async fn main(_spawner: Spawner) {
4949
let scl = p.PIN_15;
5050

5151
info!("set up i2c ");
52-
let mut config = Config::default();
53-
// by default internal pullup resitors are disabled
54-
config.sda_pullup = true;
55-
config.scl_pullup = true;
52+
// Default I2C config enables internal pull-up resistors.
53+
let config = Config::default();
5654
let mut i2c = i2c::I2c::new_blocking(p.I2C1, scl, sda, config);
5755

5856
use mcp23017::*;

0 commit comments

Comments
 (0)