Skip to content

Commit 6f6b18f

Browse files
committed
Separate DmaTransfer from version that supports async
1 parent 3dcad58 commit 6f6b18f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/spi/dma.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ where
382382
}
383383

384384
async fn read_dma(&mut self, words: &mut [W]) -> Result<(), Error> {
385-
let result = self.start_dma_read(words)?.await;
385+
let result = self.start_dma_read(words)?.to_async().await;
386386
self.finish_transfer(result)
387387
}
388388
}
@@ -416,7 +416,7 @@ where
416416
}
417417

418418
async fn write_dma(&mut self, words: &[W]) -> Result<(), Error> {
419-
let result = self.start_dma_write(words)?.await;
419+
let result = self.start_dma_write(words)?.to_async().await;
420420
self.finish_transfer(result)
421421
}
422422
}
@@ -464,7 +464,7 @@ where
464464
write: &[W],
465465
) -> Result<(), Error> {
466466
let (tx, rx) = self.start_dma_duplex_transfer(read, write)?;
467-
467+
let (tx, rx) = (tx.to_async(), rx.to_async());
468468
let result = tx.await.and(rx.await);
469469

470470
self.finish_transfer(result)

0 commit comments

Comments
 (0)