linux: Use enumerations for pin mappings

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor authored and KevinOConnor committed 2019-03-17 19:38:18 -04:00
1 parent ae24baf99a
commit df6136802a
2 files changed
+2 -1

No files matched your search

-1
View File
@@ -14,7 +14,6 @@ class error(Exception):
######################################################################
MCU_PINS = {
"linux": {"analog%d" % i: i for i in range(8)}, # XXX
}
+2
View File
@@ -15,6 +15,8 @@
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"
struct gpio_adc