We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f64fc2 commit 45d9201Copy full SHA for 45d9201
nrf-hal-common/src/twim.rs
@@ -380,9 +380,9 @@ where
380
unsafe { w.maxcnt().bits(rx_buffer.len() as _) });
381
382
// Chunk write data
383
- for chunk in tx_buffer.chunks(FORCE_COPY_BUFFER_SIZE) {
+ let wr_buffer = &mut [0; FORCE_COPY_BUFFER_SIZE][..];
384
+ for chunk in tx_buffer.chunks(FORCE_COPY_BUFFER_SIZE.min(EASY_DMA_SIZE)) {
385
// Copy chunk into RAM
- let wr_buffer = &mut [0; FORCE_COPY_BUFFER_SIZE][..];
386
wr_buffer[..chunk.len()].copy_from_slice(chunk);
387
388
// Set up the DMA write
0 commit comments