Open
Description
At the moment there is no way on the RP2 port to write properly modular code that makes use of DMA without running the risk of two modules both trying to use the same channel. The underlying Raspberry Pi Pico C/C++ SDK provides a library function dma_claim_unused_channel()
to deal with exactly this problem, but it is not exposed in the MicroPython. The lack of support for this is an impediment to writing anything other than trivial code that uses DMA.
The rp2.DMA
class implemented in #7641 fixes this issue and at the same time provides a high level, Pythonic interface to the DMA hardware. It would be really helpful if this PR could be merged.