Skip to content
Snippets Groups Projects
Commit 612772fa authored by rahix's avatar rahix
Browse files

Merge 'Properly disable AMUX when not in use'

See merge request !280
parents 78a0e6e6 be41bd75
Branches
No related tags found
No related merge requests found
......@@ -52,6 +52,7 @@ void watchdog_clearer_init();
#define BATTERY_CRITICAL 3.40f
enum pmic_amux_signal {
PMIC_AMUX_DISABLED = 0x0,
PMIC_AMUX_CHGIN_U = 0x1,
PMIC_AMUX_CHGIN_I = 0x2,
PMIC_AMUX_BATT_U = 0x3,
......
......@@ -86,7 +86,7 @@ int pmic_read_amux(enum pmic_amux_signal sig, float *result)
ADC_GetData(&adc_data);
/* Turn MUX back to neutral so it does not waste power. */
MAX77650_setMUX_SEL(sig);
MAX77650_setMUX_SEL(PMIC_AMUX_DISABLED);
/* Convert ADC measurement to SI Volts */
float adc_voltage = (float)adc_data / 1023.0f * 1.22f;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment