aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src
diff options
context:
space:
mode:
authorRenĂ© van Dorst <[email protected]>2025-08-19 16:37:24 +0200
committerRenĂ© van Dorst <[email protected]>2025-08-19 16:51:01 +0200
commit0d8350f326361a0f7c5aa2d71f48cbec7c39287a (patch)
treea8c683f231928e887ade3ce3085a06bd0187ea17 /embassy-stm32/src
parenta5cb04bdab602bc3bd056d254a9d61cad55bd967 (diff)
stm32/i2c: Pull-down enabled when non-pull was requested.
When no internal pull-up is needed, the pull-down was enabled instead of pull-none. With the pull-down resistors and external pull-up resistors, this creates a voltage divider, which causes unwanted situation.
Diffstat (limited to 'embassy-stm32/src')
-rw-r--r--embassy-stm32/src/i2c/config.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32/src/i2c/config.rs b/embassy-stm32/src/i2c/config.rs
index b27bb778c..4e3b736c7 100644
--- a/embassy-stm32/src/i2c/config.rs
+++ b/embassy-stm32/src/i2c/config.rs
@@ -156,7 +156,7 @@ impl Config {
156 self.gpio_speed, 156 self.gpio_speed,
157 match self.scl_pullup { 157 match self.scl_pullup {
158 true => Pull::Up, 158 true => Pull::Up,
159 false => Pull::Down, 159 false => Pull::None,
160 }, 160 },
161 ); 161 );
162 } 162 }
@@ -170,7 +170,7 @@ impl Config {
170 self.gpio_speed, 170 self.gpio_speed,
171 match self.sda_pullup { 171 match self.sda_pullup {
172 true => Pull::Up, 172 true => Pull::Up,
173 false => Pull::Down, 173 false => Pull::None,
174 }, 174 },
175 ); 175 );
176 } 176 }