From bf1da0497ce1a591865f2bd8d0a29489079e710b Mon Sep 17 00:00:00 2001 From: Mathias Date: Tue, 27 Sep 2022 08:03:49 +0200 Subject: [PATCH] Allow unused fields temporarily in i2c --- embassy-rp/src/i2c.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/embassy-rp/src/i2c.rs b/embassy-rp/src/i2c.rs index d1ec77d33..9596d661d 100644 --- a/embassy-rp/src/i2c.rs +++ b/embassy-rp/src/i2c.rs @@ -52,9 +52,9 @@ impl Default for Config { const FIFO_SIZE: u8 = 16; pub struct I2c<'d, T: Instance, M: Mode> { - tx_dma: Option>, - rx_dma: Option>, - dma_buf: [u16; 256], + _tx_dma: Option>, + _rx_dma: Option>, + _dma_buf: [u16; 256], phantom: PhantomData<(&'d mut T, M)>, } @@ -75,8 +75,8 @@ impl<'d, T: Instance, M: Mode> I2c<'d, T, M> { _peri: impl Peripheral

+ 'd, scl: PeripheralRef<'d, AnyPin>, sda: PeripheralRef<'d, AnyPin>, - tx_dma: Option>, - rx_dma: Option>, + _tx_dma: Option>, + _rx_dma: Option>, config: Config, ) -> Self { into_ref!(_peri); @@ -173,9 +173,9 @@ impl<'d, T: Instance, M: Mode> I2c<'d, T, M> { } Self { - tx_dma, - rx_dma, - dma_buf: [0; 256], + _tx_dma, + _rx_dma, + _dma_buf: [0; 256], phantom: PhantomData, } }