There are many Drivers operating in parallel on the DotBot. Tracking which resources each one uses - To avoid collisions - is becoming inconvenient. Taking inspiration from the RP2040 SDK We should include a functionality to automatically keep track of which timers and channels are being used, and return free channels when the user requests it.
Here is an example based on the RP2040 DMA peripheral BSP.
You have a function to claim/unclaim a specific timer, and or channel.
And a function to request a channel that is currently unused (so the library assigns you one that it knows it's free)
There are many Drivers operating in parallel on the DotBot. Tracking which resources each one uses - To avoid collisions - is becoming inconvenient. Taking inspiration from the RP2040 SDK We should include a functionality to automatically keep track of which timers and channels are being used, and return free channels when the user requests it.
Here is an example based on the RP2040 DMA peripheral BSP.
You have a function to claim/unclaim a specific timer, and or channel.
And a function to request a channel that is currently unused (so the library assigns you one that it knows it's free)