diff options
| author | René van Dorst <[email protected]> | 2025-08-19 16:37:24 +0200 |
|---|---|---|
| committer | René van Dorst <[email protected]> | 2025-08-19 16:51:01 +0200 |
| commit | 0d8350f326361a0f7c5aa2d71f48cbec7c39287a (patch) | |
| tree | a8c683f231928e887ade3ce3085a06bd0187ea17 /embassy-stm32 | |
| parent | a5cb04bdab602bc3bd056d254a9d61cad55bd967 (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')
| -rw-r--r-- | embassy-stm32/src/i2c/config.rs | 4 |
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 | } |
