docs
This commit is contained in:
parent
f1b37bbad1
commit
aefb45cf6c
|
@ -17,8 +17,10 @@
|
||||||
|
|
||||||
#define voltsToAdc(volts) ((volts) * (ADC_MAX_VALUE / (engineConfiguration->adcVcc)))
|
#define voltsToAdc(volts) ((volts) * (ADC_MAX_VALUE / (engineConfiguration->adcVcc)))
|
||||||
|
|
||||||
|
// voltage in MCU universe, from zero to VDD
|
||||||
#define getVoltage(msg, hwChannel) (adcToVolts(getAdcValue(msg, hwChannel)))
|
#define getVoltage(msg, hwChannel) (adcToVolts(getAdcValue(msg, hwChannel)))
|
||||||
|
|
||||||
|
// Board voltage, with divider coefficient accounted for
|
||||||
#define getVoltageDivided(msg, hwChannel) (getVoltage(msg, hwChannel) * engineConfiguration->analogInputDividerCoefficient)
|
#define getVoltageDivided(msg, hwChannel) (getVoltage(msg, hwChannel) * engineConfiguration->analogInputDividerCoefficient)
|
||||||
|
|
||||||
#endif /* ADC_MATH_H_ */
|
#endif /* ADC_MATH_H_ */
|
||||||
|
|
Loading…
Reference in New Issue