Switching between analog and digital GPIO pin

Kaisha
Posts: 42
Joined: Thu Mar 05, 2020 8:59 pm

Switching between analog and digital GPIO pin

Postby Kaisha » Sun Mar 15, 2020 6:48 pm

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?

amarotica
Posts: 11
Joined: Wed Jul 22, 2020 4:56 pm

Re: Switching between analog and digital GPIO pin

Postby amarotica » Thu Apr 01, 2021 2:26 am

I am also interested in knowing this. Thanks!

Who is online

Users browsing this forum: Baidu [Spider] and 46 guests