From e00a432ed5c792bdf85849236f623145f3d0cf9a Mon Sep 17 00:00:00 2001 From: 9names <60134748+9names@users.noreply.github.com> Date: Sat, 21 Aug 2021 02:07:56 +1000 Subject: [PATCH] Enable internal pullups for i2c --- rp2040-hal/src/gpio/reg.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rp2040-hal/src/gpio/reg.rs b/rp2040-hal/src/gpio/reg.rs index aae57d9..8508b50 100644 --- a/rp2040-hal/src/gpio/reg.rs +++ b/rp2040-hal/src/gpio/reg.rs @@ -88,6 +88,10 @@ impl From<DynPinMode> for ModeFields { UsbAux => 9, }; fields.inen = true; + if func == I2C { + fields.pue = true; + fields.pde = false; + } } };