linux: Use enumerations for pin mappings

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-03-12 12:35:11 -04:00 committed by KevinOConnor
parent ae24baf99a
commit df6136802a
2 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,6 @@ class error(Exception):
######################################################################
MCU_PINS = {
"linux": {"analog%d" % i: i for i in range(8)}, # XXX
}

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