diff options
| author | Sebastian Goll <[email protected]> | 2024-03-20 03:30:38 +0100 |
|---|---|---|
| committer | Sebastian Goll <[email protected]> | 2024-03-20 03:33:15 +0100 |
| commit | 4eb4108952ee75d75b2b575144a0db3a6380dd61 (patch) | |
| tree | 1a159f67555350f051453e519910aa28e427bde9 | |
| parent | 8f19a2b537c90c2bf04f6e5ea9a7107f6e000067 (diff) | |
Fix build for I2C v2 targets
| -rw-r--r-- | embassy-stm32/src/i2c/v2.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/embassy-stm32/src/i2c/v2.rs b/embassy-stm32/src/i2c/v2.rs index bd3abaac1..1ac2740df 100644 --- a/embassy-stm32/src/i2c/v2.rs +++ b/embassy-stm32/src/i2c/v2.rs | |||
| @@ -4,6 +4,7 @@ use core::task::Poll; | |||
| 4 | 4 | ||
| 5 | use embassy_embedded_hal::SetConfig; | 5 | use embassy_embedded_hal::SetConfig; |
| 6 | use embassy_hal_internal::drop::OnDrop; | 6 | use embassy_hal_internal::drop::OnDrop; |
| 7 | use embedded_hal_1::i2c::Operation; | ||
| 7 | 8 | ||
| 8 | use super::*; | 9 | use super::*; |
| 9 | use crate::dma::Transfer; | 10 | use crate::dma::Transfer; |
| @@ -579,6 +580,17 @@ impl<'d, T: Instance, TXDMA, RXDMA> I2c<'d, T, TXDMA, RXDMA> { | |||
| 579 | // Automatic Stop | 580 | // Automatic Stop |
| 580 | } | 581 | } |
| 581 | 582 | ||
| 583 | /// Blocking transaction with operations. | ||
| 584 | /// | ||
| 585 | /// Consecutive operations of same type are merged. See [transaction contract] for details. | ||
| 586 | /// | ||
| 587 | /// [transaction contract]: embedded_hal_1::i2c::I2c::transaction | ||
| 588 | pub fn blocking_transaction(&mut self, addr: u8, operations: &mut [Operation<'_>]) -> Result<(), Error> { | ||
| 589 | let _ = addr; | ||
| 590 | let _ = operations; | ||
| 591 | todo!() | ||
| 592 | } | ||
| 593 | |||
| 582 | /// Blocking write multiple buffers. | 594 | /// Blocking write multiple buffers. |
| 583 | /// | 595 | /// |
| 584 | /// The buffers are concatenated in a single write transaction. | 596 | /// The buffers are concatenated in a single write transaction. |
