diff options
| -rw-r--r-- | embassy-nrf/src/spim.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/embassy-nrf/src/spim.rs b/embassy-nrf/src/spim.rs index 0ca18d88c..b5e9afbc1 100644 --- a/embassy-nrf/src/spim.rs +++ b/embassy-nrf/src/spim.rs | |||
| @@ -196,8 +196,9 @@ impl<'d, T: Instance> FullDuplex<u8> for Spim<'d, T> { | |||
| 196 | 196 | ||
| 197 | fn read_write<'a>(&'a mut self, rx: &'a mut [u8], tx: &'a [u8]) -> Self::WriteReadFuture<'a> { | 197 | fn read_write<'a>(&'a mut self, rx: &'a mut [u8], tx: &'a [u8]) -> Self::WriteReadFuture<'a> { |
| 198 | async move { | 198 | async move { |
| 199 | slice_in_ram_or(rx, Error::DMABufferNotInDataMemory)?; | ||
| 200 | slice_in_ram_or(tx, Error::DMABufferNotInDataMemory)?; | 199 | slice_in_ram_or(tx, Error::DMABufferNotInDataMemory)?; |
| 200 | // NOTE: RAM slice check for rx is not necessary, as a mutable | ||
| 201 | // slice can only be built from data located in RAM. | ||
| 201 | 202 | ||
| 202 | // Conservative compiler fence to prevent optimizations that do not | 203 | // Conservative compiler fence to prevent optimizations that do not |
| 203 | // take in to account actions by DMA. The fence has been placed here, | 204 | // take in to account actions by DMA. The fence has been placed here, |
