docs
This commit is contained in:
parent
fb36ef4708
commit
6dac13a2f8
|
@ -17,8 +17,10 @@
|
|||
|
||||
#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)))
|
||||
|
||||
// Board voltage, with divider coefficient accounted for
|
||||
#define getVoltageDivided(msg, hwChannel) (getVoltage(msg, hwChannel) * engineConfiguration->analogInputDividerCoefficient)
|
||||
|
||||
#endif /* ADC_MATH_H_ */
|
||||
|
|
Loading…
Reference in New Issue