diff options
| author | pbert <[email protected]> | 2023-10-11 21:38:41 +0200 |
|---|---|---|
| committer | pbert <[email protected]> | 2023-10-12 11:04:44 +0200 |
| commit | ecdd7c0e2f9dcc07e53e136557140d3ccc6a5ee1 (patch) | |
| tree | 6db9bf875d3e83d94f6bf8e8a2e7ff03a83c5bb4 /embassy-stm32/src/i2c | |
| parent | d7d79f3068a4a2d883b078b8900ad194f7c98203 (diff) | |
enable clock first
Diffstat (limited to 'embassy-stm32/src/i2c')
| -rw-r--r-- | embassy-stm32/src/i2c/v1.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/i2c/v2.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32/src/i2c/v1.rs b/embassy-stm32/src/i2c/v1.rs index cc2b23a7f..ab59f5ab9 100644 --- a/embassy-stm32/src/i2c/v1.rs +++ b/embassy-stm32/src/i2c/v1.rs | |||
| @@ -56,7 +56,7 @@ impl<'d, T: Instance, TXDMA, RXDMA> I2c<'d, T, TXDMA, RXDMA> { | |||
| 56 | ) -> Self { | 56 | ) -> Self { |
| 57 | into_ref!(scl, sda, tx_dma, rx_dma); | 57 | into_ref!(scl, sda, tx_dma, rx_dma); |
| 58 | 58 | ||
| 59 | T::reset_and_enable(); | 59 | T::enable_and_reset(); |
| 60 | 60 | ||
| 61 | scl.set_as_af_pull( | 61 | scl.set_as_af_pull( |
| 62 | scl.af_num(), | 62 | scl.af_num(), |
diff --git a/embassy-stm32/src/i2c/v2.rs b/embassy-stm32/src/i2c/v2.rs index 1a49ecb24..b6d880d57 100644 --- a/embassy-stm32/src/i2c/v2.rs +++ b/embassy-stm32/src/i2c/v2.rs | |||
| @@ -86,7 +86,7 @@ impl<'d, T: Instance, TXDMA, RXDMA> I2c<'d, T, TXDMA, RXDMA> { | |||
| 86 | ) -> Self { | 86 | ) -> Self { |
| 87 | into_ref!(peri, scl, sda, tx_dma, rx_dma); | 87 | into_ref!(peri, scl, sda, tx_dma, rx_dma); |
| 88 | 88 | ||
| 89 | T::reset_and_enable(); | 89 | T::enable_and_reset(); |
| 90 | 90 | ||
| 91 | scl.set_as_af_pull( | 91 | scl.set_as_af_pull( |
| 92 | scl.af_num(), | 92 | scl.af_num(), |
