@KurtE thanks, thats good to know! If you have any feedback on the PR as well, I'd also certainly appreciate it. Thanks again!
What goes into this, is totally up to Paul, as it is his platform and his github project.
If he sounds at all receptive to this and asks, there are probably a few of us who will try it out and the like.
My guessing, but I believe you would probably have a better chance with multiple functions, like transfer16 and transfer32. There are
already some implementations for the non-DMA versions of some of these.
That instead of your version:
Code:
bool transfer(const void *txBuffer, void *rxBuffer, size_t count, EventResponderRef event_responder, uint8_t framesize=7);
You would have:
Code:
bool transfer16(const void *txBuffer, void *rxBuffer, size_t count, EventResponderRef event_responder);
\
And if he does except one like you mentioned, I would think you should pass in 8-32 instead of 7-31 as the parameter.
Questions you asked:
Should new API's such as this be applied to the Teensy 3.x? My guess is yes. And this adds complexity as the
DMA implementations are different for 3.6 versus 3.5 versus ...
I don't think you would need to implement for AVR boards.
Should other APIs be updated to add this consistency? I am guessing you would probably need to go the other way.
Need to be updated code you mentioned?
maybe, like < 2 would need to go to different versions of API. for different word size.
The arm_dcache_... probably does not need to change. This has to do with different memory regions, have a cache to the memory. And DMA always talks to actual physical memory. So when you are writing from memory, you need to flush whatever is in the cache to memory, and when you do reads you need to delete the cache such that new reads will get the update stuff that came in from dma..
Hope that helps
Kurt