Allow unused fields temporarily in i2c
@@ -52,9 +52,9 @@ impl Default for Config {
const FIFO_SIZE: u8 = 16;
pub struct I2c<'d, T: Instance, M: Mode> {
- tx_dma: Option<PeripheralRef<'d, AnyChannel>>,
- rx_dma: Option<PeripheralRef<'d, AnyChannel>>,
- dma_buf: [u16; 256],
+ _tx_dma: Option<PeripheralRef<'d, AnyChannel>>,
+ _rx_dma: Option<PeripheralRef<'d, AnyChannel>>,
+ _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<P = T> + 'd,
scl: PeripheralRef<'d, AnyPin>,
sda: PeripheralRef<'d, AnyPin>,
- tx_dma: Option<PeripheralRef<'d, AnyChannel>>,
- rx_dma: Option<PeripheralRef<'d, AnyChannel>>,
+ _tx_dma: Option<PeripheralRef<'d, AnyChannel>>,
+ _rx_dma: Option<PeripheralRef<'d, AnyChannel>>,
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,
}
}
