Hi,
I'm using the following method to connect a pin to a signal:
esp_rom_gpio_connect_out_signal(pin, signal, false, false);
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[pin], PIN_FUNC_GPIO);
gpio_set_drive_capability((gpio_num_t)pin, (gpio_drive_cap_t)3);
I found it somewhere on the internet, can't remember where, but it works fine. The question is if it is possible to disconnect the pin from a signal and connecting another pin without restarting ESP32?
I tried searching the include folder for something like esp_rom_gpio_disconnect_out_signal, but it doesn't exist.
Disconnecting output pin
-
- Posts: 9724
- Joined: Thu Nov 26, 2015 4:08 am
Re: Disconnecting output pin
You can't disconnect an output pin; it always needs to be driven by something. You can re-initialize it as a GPIO (esp-idf has gpio_reset_pin for that, should work on Arduino as well) and make it an input or something.,
Re: Disconnecting output pin
Thank you for your reply. Since the pin is connected to LCD peripheral, is there something I have to keep in mind while doing it while it's in use? I'm changing the pixel format "on the fly". I don't mind if I get some artefact while it's being changed, if that's the only conncern.
Who is online
Users browsing this forum: Majestic-12 [Bot] and 137 guests