-
-
Save suru-dissanaike/98c286d44e3bbce2adf94d7f786c1ff9 to your computer and use it in GitHub Desktop.
mgos_adc_enable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool mgos_adc_enable(int pin) { | |
struct esp32_adc_channel_info *ci = esp32_adc_get_channel_info(pin); | |
if (ci == NULL) return false; | |
/* TODO(rojer): Allow changing? */ | |
ci->atten = ADC_ATTEN_11db; | |
return esp32_update_channel_settings(ci); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment