mirror of https://github.com/Desuuuu/klipper.git
linux: Use enumerations for pin mappings
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
ae24baf99a
commit
df6136802a
|
@ -14,7 +14,6 @@ class error(Exception):
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
MCU_PINS = {
|
MCU_PINS = {
|
||||||
"linux": {"analog%d" % i: i for i in range(8)}, # XXX
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
DECL_CONSTANT("ADC_MAX", 4095); // Assume 12bit adc
|
DECL_CONSTANT("ADC_MAX", 4095); // Assume 12bit adc
|
||||||
|
|
||||||
|
DECL_ENUMERATION_RANGE("pin", "analog0", 0, 8);
|
||||||
|
|
||||||
#define IIO_PATH "/sys/bus/iio/devices/iio:device0/in_voltage%d_raw"
|
#define IIO_PATH "/sys/bus/iio/devices/iio:device0/in_voltage%d_raw"
|
||||||
|
|
||||||
struct gpio_adc
|
struct gpio_adc
|
||||||
|
|
Loading…
Reference in New Issue