The iio device file, The read speed of "in_voltage0_input" is very slow. This will adversely affect the stepper motor operation and result in a "Stepper too far in past" error.
Read the value of Voltage0_raw and calculate the ADC voltage directly in the klipper.
Change-Id: Iedb1b5f7fbfedc60d42fc1a28eaa7e49879d6404
ODROID-C5 has two internal 10bit ADCs. However, the value of in_voltage0_raw outputs a difficult number.
So, klipper read "in_voltage0_input", which outputs the actual voltage value, to read the value of ADC.
Change-Id: I32aada4e66e6034823bf66c41fccf178d6ff50d0
Make it clear that the name of the constant being defined is a string.
When the value being defined is also a string, use a new
DECL_CONSTANT_STR() macro.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Continue to sample the ADC input pins even if the MCU goes into a
shutdown state. This enables the printer to continue reporting
temperatures even on an mcu error.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support for reading analog values via the standard Linux IIO
interface. This can be used on Replicape boards to sample analog
input pins.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>