Skip to content
Snippets Groups Projects
Commit bf1da049 authored by Mathias's avatar Mathias Committed by Dario Nieuwenhuis
Browse files

Allow unused fields temporarily in i2c

parent 44c46e3c
Branches
No related merge requests found
...@@ -52,9 +52,9 @@ impl Default for Config { ...@@ -52,9 +52,9 @@ impl Default for Config {
const FIFO_SIZE: u8 = 16; const FIFO_SIZE: u8 = 16;
pub struct I2c<'d, T: Instance, M: Mode> { pub struct I2c<'d, T: Instance, M: Mode> {
tx_dma: Option<PeripheralRef<'d, AnyChannel>>, _tx_dma: Option<PeripheralRef<'d, AnyChannel>>,
rx_dma: Option<PeripheralRef<'d, AnyChannel>>, _rx_dma: Option<PeripheralRef<'d, AnyChannel>>,
dma_buf: [u16; 256], _dma_buf: [u16; 256],
phantom: PhantomData<(&'d mut T, M)>, phantom: PhantomData<(&'d mut T, M)>,
} }
...@@ -75,8 +75,8 @@ impl<'d, T: Instance, M: Mode> I2c<'d, T, M> { ...@@ -75,8 +75,8 @@ impl<'d, T: Instance, M: Mode> I2c<'d, T, M> {
_peri: impl Peripheral<P = T> + 'd, _peri: impl Peripheral<P = T> + 'd,
scl: PeripheralRef<'d, AnyPin>, scl: PeripheralRef<'d, AnyPin>,
sda: PeripheralRef<'d, AnyPin>, sda: PeripheralRef<'d, AnyPin>,
tx_dma: Option<PeripheralRef<'d, AnyChannel>>, _tx_dma: Option<PeripheralRef<'d, AnyChannel>>,
rx_dma: Option<PeripheralRef<'d, AnyChannel>>, _rx_dma: Option<PeripheralRef<'d, AnyChannel>>,
config: Config, config: Config,
) -> Self { ) -> Self {
into_ref!(_peri); into_ref!(_peri);
...@@ -173,9 +173,9 @@ impl<'d, T: Instance, M: Mode> I2c<'d, T, M> { ...@@ -173,9 +173,9 @@ impl<'d, T: Instance, M: Mode> I2c<'d, T, M> {
} }
Self { Self {
tx_dma, _tx_dma,
rx_dma, _rx_dma,
dma_buf: [0; 256], _dma_buf: [0; 256],
phantom: PhantomData, phantom: PhantomData,
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment