rust-embedded/heapless

Alignment of internal arrays

MabezDev opened this issue · 2 comments

I often reach for heapless::Vec, but find myself having to write a custom slice wrapper due to peripheral alignment constraints have you had any thoughts about introducing a way to constrain the internal buffers alignment some how?

I found a quite nice crate called elain which I used in embedded-fatfs' block device wrapper. It allows the alignment of a field to be defined by a const generic parameter.

I would love this feature too.

@MabezDev You can take a look at my PR where I implemented AlignedVec #429