// Ensure the flash stays off while we sleep
rtc_gpio_hold_en(GPIO_NUM_4);
any subsequent attempt to modify the pin settings will fail, resulting in the flash LED not coming back on again.
To solve that you'd just need to execute rtc_gpio_hold_dis(GPIO_NUM_4); before trying to setup the pin again.
Since the
sleep()
function callsany subsequent attempt to modify the pin settings will fail, resulting in the flash LED not coming back on again. To solve that you'd just need to execute
rtc_gpio_hold_dis(GPIO_NUM_4);
before trying to setup the pin again.