Ian
Ian
As a newish Rust programmer, the current example's line `static BB: BBBuffer = BBBuffer( ConstBBBuffer::new() );` was a bit confusing due to the implicit use of generic-array.
> Can you elaborate on 'too long'? Maybe more importantly than the specific timing constraint, I was surprised to find that the entirety of `read()` and `write()` is in an...
> That way we can be happily preempted by more urgent interrupts while servicing, as long as they dont take too long that we miss a frame. Is this the...
> That way we can be happily preempted by more urgent interrupts while servicing, as long as they dont take too long that we miss a frame. Thinking about this...
Sure, https://github.com/ianrrees/atsamd/commit/b1298760e4d2d4b17fe44ba9ea7372c941ff440f and its parent. It's not pretty :). (edit: updated link)
> seems to work ... without doing any masking This was premature, it definitely needs a mechanism to prevent USB interrupts while already processing one.
I think there's a fundamental issue here, but feel a bit out of my depth. Imagine that we have an implementation of `mutex` that allows work on the inner struct...
Sorry for my lack of follow-through on this, the above hack is working well enough in the meantime ;). > This was premature, it definitely needs a mechanism to prevent...
dirbaio on Matrix suggested that the stm32-usbd doesn't have this particular issue, perhaps it's possible to make UsbBus and/or Inner not by Sync, so that the user either picks their...
Currently I'm using a branch that removes the mutex/critical section (CS), it works but isn't ideal. Some possible ways we could resolve this, all involve changes to the HAL: 1....