Commit 612772fa authored by Rahix's avatar Rahix

Merge 'Properly disable AMUX when not in use'

See merge request card10/firmware!280
parents 78a0e6e6 be41bd75
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment