[Answered] Can we call rmt_driver_uninstall without having previously called driver_install?

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

[Answered] Can we call rmt_driver_uninstall without having previously called driver_install?

Postby kolban » Sun Nov 27, 2016 12:17 am

In my current design, I have a need to allow the user to dynamically configure an RMT channel. I can perform the configuration and then call rmt_driver_install() to install the driver. I'll be honest, I don't fully understand what that means ... but anyway ... this question asks "Can I safely call rmt_uninstall_driver" against a channel even if there has been no previous "rmt_install_driver" against that channel? I am trying to determine whether or not I need to maintain a state/history table so that my code has to remember initialization state or can I leave it to the ESP32 to maintain that state on my behalf.
Last edited by kolban on Sun Nov 27, 2016 2:44 pm, edited 1 time in total.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: Can we call rmt_driver_uninstall without having previously called driver_install?

Postby ESP_igrr » Sun Nov 27, 2016 7:17 am

At the moment, you can not. 'uninstall' function dereferences the pointer to the per-channel configuration structure which is allocated in 'install' without checking it for NULL.

Who is online

Users browsing this forum: No registered users and 215 guests