diff options
| author | Jeremy Fitzhardinge <[email protected]> | 2022-09-27 23:24:22 -0700 |
|---|---|---|
| committer | Jeremy Fitzhardinge <[email protected]> | 2022-10-01 13:26:13 -0700 |
| commit | 8d38eacae426ef1b1e1f7255eed50a9588793fb4 (patch) | |
| tree | 2b1ba95cc0d85372a6fb240bfaff83560a74c944 | |
| parent | 90d392205fe7c07cbc59b09679cde6cfc1e244b6 (diff) | |
rp i2c: remove vestiges of DMA
| -rw-r--r-- | embassy-rp/src/i2c.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/embassy-rp/src/i2c.rs b/embassy-rp/src/i2c.rs index ab56c9359..a6f278827 100644 --- a/embassy-rp/src/i2c.rs +++ b/embassy-rp/src/i2c.rs | |||
| @@ -3,7 +3,6 @@ use core::marker::PhantomData; | |||
| 3 | use embassy_hal_common::{into_ref, PeripheralRef}; | 3 | use embassy_hal_common::{into_ref, PeripheralRef}; |
| 4 | use pac::i2c; | 4 | use pac::i2c; |
| 5 | 5 | ||
| 6 | use crate::dma::AnyChannel; | ||
| 7 | use crate::gpio::sealed::Pin; | 6 | use crate::gpio::sealed::Pin; |
| 8 | use crate::gpio::AnyPin; | 7 | use crate::gpio::AnyPin; |
| 9 | use crate::{pac, peripherals, Peripheral}; | 8 | use crate::{pac, peripherals, Peripheral}; |
| @@ -52,9 +51,6 @@ impl Default for Config { | |||
| 52 | const FIFO_SIZE: u8 = 16; | 51 | const FIFO_SIZE: u8 = 16; |
| 53 | 52 | ||
| 54 | pub struct I2c<'d, T: Instance, M: Mode> { | 53 | pub struct I2c<'d, T: Instance, M: Mode> { |
| 55 | _tx_dma: Option<PeripheralRef<'d, AnyChannel>>, | ||
| 56 | _rx_dma: Option<PeripheralRef<'d, AnyChannel>>, | ||
| 57 | _dma_buf: [u16; 256], | ||
| 58 | phantom: PhantomData<(&'d mut T, M)>, | 54 | phantom: PhantomData<(&'d mut T, M)>, |
| 59 | } | 55 | } |
| 60 | 56 | ||
| @@ -66,7 +62,7 @@ impl<'d, T: Instance> I2c<'d, T, Blocking> { | |||
| 66 | config: Config, | 62 | config: Config, |
| 67 | ) -> Self { | 63 | ) -> Self { |
| 68 | into_ref!(scl, sda); | 64 | into_ref!(scl, sda); |
| 69 | Self::new_inner(_peri, scl.map_into(), sda.map_into(), None, None, config) | 65 | Self::new_inner(_peri, scl.map_into(), sda.map_into(), config) |
| 70 | } | 66 | } |
| 71 | } | 67 | } |
| 72 | 68 | ||
| @@ -75,8 +71,6 @@ impl<'d, T: Instance, M: Mode> I2c<'d, T, M> { | |||
| 75 | _peri: impl Peripheral<P = T> + 'd, | 71 | _peri: impl Peripheral<P = T> + 'd, |
| 76 | scl: PeripheralRef<'d, AnyPin>, | 72 | scl: PeripheralRef<'d, AnyPin>, |
| 77 | sda: PeripheralRef<'d, AnyPin>, | 73 | sda: PeripheralRef<'d, AnyPin>, |
| 78 | _tx_dma: Option<PeripheralRef<'d, AnyChannel>>, | ||
| 79 | _rx_dma: Option<PeripheralRef<'d, AnyChannel>>, | ||
| 80 | config: Config, | 74 | config: Config, |
| 81 | ) -> Self { | 75 | ) -> Self { |
| 82 | into_ref!(_peri); | 76 | into_ref!(_peri); |
| @@ -173,9 +167,6 @@ impl<'d, T: Instance, M: Mode> I2c<'d, T, M> { | |||
| 173 | } | 167 | } |
| 174 | 168 | ||
| 175 | Self { | 169 | Self { |
| 176 | _tx_dma, | ||
| 177 | _rx_dma, | ||
| 178 | _dma_buf: [0; 256], | ||
| 179 | phantom: PhantomData, | 170 | phantom: PhantomData, |
| 180 | } | 171 | } |
| 181 | } | 172 | } |
