diff options
| author | Timo Kröger <[email protected]> | 2024-03-08 19:26:49 +0100 |
|---|---|---|
| committer | Timo Kröger <[email protected]> | 2024-03-12 08:14:42 +0100 |
| commit | 99854ff840fdd12d7562923f6a9ef2d39e1c9f17 (patch) | |
| tree | 53cd0090d406c4039afd9b69039fff517c4201be | |
| parent | ff8129a6a6845186bac92c6b6fcfefa03a7a7d4d (diff) | |
[UCPD] Fix build for devices with GPDMA
Do not use a flag that is DMA/BDMA only, not required anyway
the transfer should run in the background nevertheless
| -rw-r--r-- | embassy-stm32/src/ucpd.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/embassy-stm32/src/ucpd.rs b/embassy-stm32/src/ucpd.rs index 05a61634a..d1b793e26 100644 --- a/embassy-stm32/src/ucpd.rs +++ b/embassy-stm32/src/ucpd.rs | |||
| @@ -269,18 +269,12 @@ impl<'d, T: Instance> PdPhy<'d, T> { | |||
| 269 | 269 | ||
| 270 | // Keep the DMA transfer alive so its drop code does not stop it right away. | 270 | // Keep the DMA transfer alive so its drop code does not stop it right away. |
| 271 | let dma = unsafe { | 271 | let dma = unsafe { |
| 272 | // Disable the DMA complete interrupt because the end of packet is | ||
| 273 | // signaled by the UCPD receiver. When the DMA buffer is too short | ||
| 274 | // DMA stops by itself and the overrun RXOVR flag of UCPD is set. | ||
| 275 | let mut transfer_options = TransferOptions::default(); | ||
| 276 | transfer_options.complete_transfer_ir = false; | ||
| 277 | |||
| 278 | Transfer::new_read( | 272 | Transfer::new_read( |
| 279 | &self.rx_dma_ch, | 273 | &self.rx_dma_ch, |
| 280 | self.rx_dma_req, | 274 | self.rx_dma_req, |
| 281 | r.rxdr().as_ptr() as *mut u8, | 275 | r.rxdr().as_ptr() as *mut u8, |
| 282 | buf, | 276 | buf, |
| 283 | transfer_options, | 277 | TransferOptions::default(), |
| 284 | ) | 278 | ) |
| 285 | }; | 279 | }; |
| 286 | 280 | ||
