rust-embedded / embedded-dma

Apache License 2.0
35 stars 11 forks source link

Read/write stride #24

Open jsgf opened 2 years ago

jsgf commented 2 years ago

The ReadBuffer/WriteBuffer types only have the base address and length, but no stride. This doesn't allow them to handle DMA engines where you can do scatter-gather operations. Or alternatively a zero stride for writing to a single address (such as a device FIFO).

For context, I'm primarily looking at the rp2040's DMA engines.

jsgf commented 2 years ago

Hm, the RP2040 doesn't really support arbitrary stride - just advancing by 1/2/4 bytes, or not at all. So really this can be modelled with an in_place flag or similar.