aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Goll <[email protected]>2024-03-27 01:41:13 +0100
committerSebastian Goll <[email protected]>2024-03-27 01:41:13 +0100
commit13636556d969314843a04907d22e2921b1be388d (patch)
tree8d0bfb2c7c944b06d4fcdc014671fa94f59c6622
parent0cfb65abc225cafa89562eb80d8e61389465d7ef (diff)
Mark shared data structure as dead_code for I2C v2 branch
-rw-r--r--embassy-stm32/src/i2c/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/embassy-stm32/src/i2c/mod.rs b/embassy-stm32/src/i2c/mod.rs
index 85381047d..9a91e2f25 100644
--- a/embassy-stm32/src/i2c/mod.rs
+++ b/embassy-stm32/src/i2c/mod.rs
@@ -356,6 +356,7 @@ impl<'d, T: Instance, TXDMA: TxDma<T>, RXDMA: RxDma<T>> embedded_hal_async::i2c:
356/// - `SP` = stop condition 356/// - `SP` = stop condition
357/// - `ACK`/`NACK` = last byte in read operation 357/// - `ACK`/`NACK` = last byte in read operation
358#[derive(Copy, Clone)] 358#[derive(Copy, Clone)]
359#[allow(dead_code)]
359enum FrameOptions { 360enum FrameOptions {
360 /// `[ST/SR]+[NACK]+[SP]` First frame (of this type) in transaction and also last frame overall. 361 /// `[ST/SR]+[NACK]+[SP]` First frame (of this type) in transaction and also last frame overall.
361 FirstAndLastFrame, 362 FirstAndLastFrame,
@@ -373,6 +374,7 @@ enum FrameOptions {
373 LastFrameNoStop, 374 LastFrameNoStop,
374} 375}
375 376
377#[allow(dead_code)]
376impl FrameOptions { 378impl FrameOptions {
377 /// Sends start or repeated start condition before transfer. 379 /// Sends start or repeated start condition before transfer.
378 fn send_start(self) -> bool { 380 fn send_start(self) -> bool {
@@ -405,6 +407,7 @@ impl FrameOptions {
405/// the right start/stop/(N)ACK conditions on the wire. 407/// the right start/stop/(N)ACK conditions on the wire.
406/// 408///
407/// [transaction contract]: embedded_hal_1::i2c::I2c::transaction 409/// [transaction contract]: embedded_hal_1::i2c::I2c::transaction
410#[allow(dead_code)]
408fn operation_frames<'a, 'b: 'a>( 411fn operation_frames<'a, 'b: 'a>(
409 operations: &'a mut [embedded_hal_1::i2c::Operation<'b>], 412 operations: &'a mut [embedded_hal_1::i2c::Operation<'b>],
410) -> Result<impl IntoIterator<Item = (&'a mut embedded_hal_1::i2c::Operation<'b>, FrameOptions)>, Error> { 413) -> Result<impl IntoIterator<Item = (&'a mut embedded_hal_1::i2c::Operation<'b>, FrameOptions)>, Error> {