aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias <[email protected]>2022-09-27 08:03:49 +0200
committerDario Nieuwenhuis <[email protected]>2022-09-27 22:08:49 +0200
commitbf1da0497ce1a591865f2bd8d0a29489079e710b (patch)
tree89aa3e8c30251b666d4c932c7af7b44506d1e7ad
parent44c46e3c93ae0718110a8805cab4c6c8a9b5df55 (diff)
Allow unused fields temporarily in i2c
-rw-r--r--embassy-rp/src/i2c.rs16
1 files 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 {
52const FIFO_SIZE: u8 = 16; 52const FIFO_SIZE: u8 = 16;
53 53
54pub struct I2c<'d, T: Instance, M: Mode> { 54pub struct I2c<'d, T: Instance, M: Mode> {
55 tx_dma: Option<PeripheralRef<'d, AnyChannel>>, 55 _tx_dma: Option<PeripheralRef<'d, AnyChannel>>,
56 rx_dma: Option<PeripheralRef<'d, AnyChannel>>, 56 _rx_dma: Option<PeripheralRef<'d, AnyChannel>>,
57 dma_buf: [u16; 256], 57 _dma_buf: [u16; 256],
58 phantom: PhantomData<(&'d mut T, M)>, 58 phantom: PhantomData<(&'d mut T, M)>,
59} 59}
60 60
@@ -75,8 +75,8 @@ impl<'d, T: Instance, M: Mode> I2c<'d, T, M> {
75 _peri: impl Peripheral<P = T> + 'd, 75 _peri: impl Peripheral<P = T> + 'd,
76 scl: PeripheralRef<'d, AnyPin>, 76 scl: PeripheralRef<'d, AnyPin>,
77 sda: PeripheralRef<'d, AnyPin>, 77 sda: PeripheralRef<'d, AnyPin>,
78 tx_dma: Option<PeripheralRef<'d, AnyChannel>>, 78 _tx_dma: Option<PeripheralRef<'d, AnyChannel>>,
79 rx_dma: Option<PeripheralRef<'d, AnyChannel>>, 79 _rx_dma: Option<PeripheralRef<'d, AnyChannel>>,
80 config: Config, 80 config: Config,
81 ) -> Self { 81 ) -> Self {
82 into_ref!(_peri); 82 into_ref!(_peri);
@@ -173,9 +173,9 @@ impl<'d, T: Instance, M: Mode> I2c<'d, T, M> {
173 } 173 }
174 174
175 Self { 175 Self {
176 tx_dma, 176 _tx_dma,
177 rx_dma, 177 _rx_dma,
178 dma_buf: [0; 256], 178 _dma_buf: [0; 256],
179 phantom: PhantomData, 179 phantom: PhantomData,
180 } 180 }
181 } 181 }