Page 1 of 1

Switching between analog and digital GPIO pin

Posted: Sun Mar 15, 2020 6:48 pm
by Kaisha
If I switch a pin to use the adc with adc_gpio_init(), and later I want to use the pin for digital I/O. Is there some de-init function that needs to be called? Is a simple call to gpio_config(), with the appropriate settings, sufficient? Do I need to recalibrate? Call adc1_config_channel_atten() again if I switch back to the ADC?

Re: Switching between analog and digital GPIO pin

Posted: Thu Apr 01, 2021 2:26 am
by amarotica
I am also interested in knowing this. Thanks!