An idle comment about DMA in gossamer yesterday made me realize it’s beyond time for me to crack that nut. Alas, being in plain old C-land, I couldn’t leverage an object oriented solution like ZeroDMA. No matter; this morning I buckled down and grokked enough of it to write a C API for doing DMA jobs. Useful for many things, but for my battery-free solar powered name tag, it lets me operate entirely without the CPU, which means it works indoors now (at least fairly close to the windows, haha).
naming things is hard, and I think the hardest part I had with grokking the DMAC is that it's all named so opaquely. There are channels, there are triggers, there are actions and descriptors and it all becomes a jumble. It should be simple: you have a job to do. You configure how the job gets done (that's the channel). then you configure what the job does (that's the descriptor).
…at least I think that's how it should work? Gonna take this API out for a spin while I DMA the DAC peripheral next.
@joeycastillo oof; I've done that one!