Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
PetePriority
firmware
Commits
be41bd75
Commit
be41bd75
authored
Aug 30, 2019
by
Florian Kargl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(pmic): Properly disable AMUX when not in use
parent
78a0e6e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
epicardium/modules/modules.h
epicardium/modules/modules.h
+1
-0
epicardium/modules/pmic.c
epicardium/modules/pmic.c
+1
-1
No files found.
epicardium/modules/modules.h
View file @
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
,
...
...
epicardium/modules/pmic.c
View file @
be41bd75
...
...
@@ -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
.
0
f
*
1
.
22
f
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment