Skip to content

Conversation

hvraven
Copy link
Contributor

@hvraven hvraven commented Aug 18, 2025

This adds support for ringbuffers with different word sizes between the buffer and the peripheral, resulting in data conversion by the DMA engine. The DMA engine performs casts as described in the reference manual, which are what one expects (truncating if target too short, prepending 0s if target to long).

To avoid accidental casts and maintain the original behaviour I created a new constructor new_with_aligment. I am up for any name suggestions, ST calls these operations data alignments.

This adds support for ringbuffers with different word sizes between the
buffer and the peripheral, resulting in data conversion by the DMA
engine. The DMA engine performs casts as described in the reference
manual, which are what one expects (truncating if target too short,
prepending 0s if target to long).

To avoid accidental casts and maintain the original behaviour I created
a new constructor `new_with_aligment`. I am up for any name suggestions,
ST calls these operations data alignments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant