diff options
| author | Lachezar Lechev <[email protected]> | 2023-03-24 12:14:23 +0200 |
|---|---|---|
| committer | Lachezar Lechev <[email protected]> | 2023-03-24 12:14:23 +0200 |
| commit | 9939d438007f33bc57697be97c9a73ee001fe737 (patch) | |
| tree | 1a36ba4f40fee7c6fef8486bf0b8db37a4ed3c2b | |
| parent | 7a4db1da2641c785f5fd9d2365df2a213f3aaade (diff) | |
fix: PR comment
Signed-off-by: Lachezar Lechev <[email protected]>
| -rw-r--r-- | embassy-rp/src/spi.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/embassy-rp/src/spi.rs b/embassy-rp/src/spi.rs index c48e33fce..e6682ad6a 100644 --- a/embassy-rp/src/spi.rs +++ b/embassy-rp/src/spi.rs | |||
| @@ -404,13 +404,8 @@ impl<'d, T: Instance> Spi<'d, T, Async> { | |||
| 404 | 404 | ||
| 405 | if from_len > to_len { | 405 | if from_len > to_len { |
| 406 | let write_bytes_len = from_len - to_len; | 406 | let write_bytes_len = from_len - to_len; |
| 407 | // disable incrementation of buffer | ||
| 408 | tx_ch.regs().ctrl_trig().modify(|ctrl_trig| { | ||
| 409 | ctrl_trig.set_incr_write(false); | ||
| 410 | ctrl_trig.set_incr_read(false); | ||
| 411 | }); | ||
| 412 | |||
| 413 | // write dummy data | 407 | // write dummy data |
| 408 | // this will disable incrementation of the buffers | ||
| 414 | crate::dma::write_repeated(tx_ch, p.dr().ptr() as *mut u8, write_bytes_len, T::TX_DREQ).await | 409 | crate::dma::write_repeated(tx_ch, p.dr().ptr() as *mut u8, write_bytes_len, T::TX_DREQ).await |
| 415 | } | 410 | } |
| 416 | } | 411 | } |
