fix: PR comment

Signed-off-by: Lachezar Lechev <elpiel93@gmail.com>
This commit is contained in:
Lachezar Lechev 2023-03-24 12:14:23 +02:00
parent 7a4db1da26
commit 9939d43800
No known key found for this signature in database
GPG Key ID: B2D641D6A2C8E742

View File

@ -404,13 +404,8 @@ impl<'d, T: Instance> Spi<'d, T, Async> {
if from_len > to_len { if from_len > to_len {
let write_bytes_len = from_len - to_len; let write_bytes_len = from_len - to_len;
// disable incrementation of buffer
tx_ch.regs().ctrl_trig().modify(|ctrl_trig| {
ctrl_trig.set_incr_write(false);
ctrl_trig.set_incr_read(false);
});
// write dummy data // write dummy data
// this will disable incrementation of the buffers
crate::dma::write_repeated(tx_ch, p.dr().ptr() as *mut u8, write_bytes_len, T::TX_DREQ).await crate::dma::write_repeated(tx_ch, p.dr().ptr() as *mut u8, write_bytes_len, T::TX_DREQ).await
} }
} }