I'm working on conversion of neopixels from nkolban.
An rmt channel is used inside. Free channels are easy to handle as long as I've all functions under my control.
With librarys, built by somebody else its not that easy anymore, there could be a conflict using same channel.
Is there a function to find "free" rmt channels ?
Or are there plans to support something similiar to dynamic handling of interrupts for rmt channels ?
Housekeeping for rmt channels
Re: Housekeeping for rmt channels
I think one must assume that the RMT channels are a "shared" resource and any third party libraries that you link with should document what channels they use and how many adjacent channels might be needed. Ideally those could then be configured. There doesn't appear to be a higher level "broker" that says "give me a channel" ... instead, your logic and the logic of third party libraries have to collaborate to avoid stepping on each other.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Housekeeping for rmt channels
Probably the best pattern to support this, is to encourage libraries not to hard-coded RMT channels, but instead take an rmt_channel_t parameter for intiailisation, ie
Then in your app's main task where you initialise all libraries, you can coordinate RMT channels there.
Code: Select all
my_library_init(RMT_CHANNEL_1);
Who is online
Users browsing this forum: No registered users and 476 guests