mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 12:46:34 +00:00
Fix ESP32-C3 gpio hold
Fix ESP32-C3 gpio hold on non-relay gpios (#20030)
This commit is contained in:
parent
c3674bd08f
commit
f0162377e2
@ -1452,9 +1452,9 @@ void DigitalWrite(uint32_t gpio_pin, uint32_t index, uint32_t state) {
|
|||||||
if (PinUsed(gpio_pin, index)) {
|
if (PinUsed(gpio_pin, index)) {
|
||||||
uint32_t pin = Pin(gpio_pin, index) & 0x3F; // Fix possible overflow over 63 gpios
|
uint32_t pin = Pin(gpio_pin, index) & 0x3F; // Fix possible overflow over 63 gpios
|
||||||
#ifdef CONFIG_IDF_TARGET_ESP32C3
|
#ifdef CONFIG_IDF_TARGET_ESP32C3
|
||||||
if (GPIO_REL1 == gpio_pin) {
|
// if (GPIO_REL1 == gpio_pin) {
|
||||||
gpio_hold_dis((gpio_num_t)pin); // Allow state change
|
gpio_hold_dis((gpio_num_t)pin); // Allow state change
|
||||||
}
|
// }
|
||||||
#endif
|
#endif
|
||||||
if (!bitRead(pinmode_init[pin / 32], pin % 32)) {
|
if (!bitRead(pinmode_init[pin / 32], pin % 32)) {
|
||||||
bitSet(pinmode_init[pin / 32], pin % 32);
|
bitSet(pinmode_init[pin / 32], pin % 32);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user