jamesmunns / bbqueue

A SPSC, lockless, no_std, thread safe, queue, based on BipBuffers
Apache License 2.0
398 stars 51 forks source link

Aligned grants #89

Open Fabien-Chouteau opened 3 years ago

Fabien-Chouteau commented 3 years ago

Hello here,

I was trying to use my SPARK implementation of bbqueue in a USB stack but I realized that it would not work with the internal DMA of the USB Device controller (samd51) because the addresses have to be 4 bytes aligned.

I think it should be possible to add alignment constraints to the framed implementation buy adding padding header length, I'd like to have your opinion on this.

jamesmunns commented 3 years ago

Hi Fabien, That sounds reasonable, and I agree using the "framed" construction (or at least a similar approach) would be the most reasonable way to achieve this.