Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stefan Haun
firmware
Commits
612772fa
Commit
612772fa
authored
Aug 30, 2019
by
Rahix
Browse files
Merge 'Properly disable AMUX when not in use'
See merge request
card10/firmware!280
parents
78a0e6e6
be41bd75
Changes
2
Hide whitespace changes
Inline
Side-by-side
epicardium/modules/modules.h
View file @
612772fa
...
...
@@ -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 @
612772fa
...
...
@@ -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
Supports
Markdown
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