diff options
| author | Sebastian Goll <[email protected]> | 2024-03-27 01:30:27 +0100 |
|---|---|---|
| committer | Sebastian Goll <[email protected]> | 2024-03-27 01:36:06 +0100 |
| commit | 0cfb65abc225cafa89562eb80d8e61389465d7ef (patch) | |
| tree | 72c161f71411d85af0114bc003e90cdfad9abdb9 | |
| parent | 54d7d495135a2d4a17457d7fdb5d9306f598acc2 (diff) | |
Add transaction stub to I2C v2
| -rw-r--r-- | embassy-stm32/src/i2c/v2.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/embassy-stm32/src/i2c/v2.rs b/embassy-stm32/src/i2c/v2.rs index 8baf2849d..da3b0ee30 100644 --- a/embassy-stm32/src/i2c/v2.rs +++ b/embassy-stm32/src/i2c/v2.rs | |||
| @@ -557,6 +557,21 @@ impl<'d, T: Instance, TXDMA, RXDMA> I2c<'d, T, TXDMA, RXDMA> { | |||
| 557 | Ok(()) | 557 | Ok(()) |
| 558 | } | 558 | } |
| 559 | 559 | ||
| 560 | /// Transaction with operations. | ||
| 561 | /// | ||
| 562 | /// Consecutive operations of same type are merged. See [transaction contract] for details. | ||
| 563 | /// | ||
| 564 | /// [transaction contract]: embedded_hal_1::i2c::I2c::transaction | ||
| 565 | pub async fn transaction(&mut self, addr: u8, operations: &mut [Operation<'_>]) -> Result<(), Error> | ||
| 566 | where | ||
| 567 | RXDMA: crate::i2c::RxDma<T>, | ||
| 568 | TXDMA: crate::i2c::TxDma<T>, | ||
| 569 | { | ||
| 570 | let _ = addr; | ||
| 571 | let _ = operations; | ||
| 572 | todo!() | ||
| 573 | } | ||
| 574 | |||
| 560 | // ========================= | 575 | // ========================= |
| 561 | // Blocking public API | 576 | // Blocking public API |
| 562 | 577 | ||
