diff --git a/source/common.c b/source/common.c index a6f24e1..1149ed0 100644 --- a/source/common.c +++ b/source/common.c @@ -204,7 +204,7 @@ int lookup_gpio_by_key(const char *key) for (p = table; p->key != NULL; ++p) { if (strcmp(p->key, key) == 0) { // FIGURE OUT IF WE'RE AN XIO PIN USING THE DEFAULT PINS - if (p->gpio >= OLDXIOBASE) { + if (p->gpio >= OLDXIOBASE && p->gpio < OLDXIOBASE+8) { int gbase = get_xio_base(); if (gbase != -1) { return (gbase + (p->gpio - OLDXIOBASE)); @@ -225,7 +225,7 @@ int lookup_gpio_by_name(const char *name) for (p = table; p->name != NULL; ++p) { if (strcmp(p->name, name) == 0) { // FIGURE OUT IF WE'RE AN XIO PIN USING THE DEFAULT PINS - if (p->gpio >= OLDXIOBASE) { + if (p->gpio >= OLDXIOBASE && p->gpio < OLDXIOBASE+8) { int gbase = get_xio_base(); if (gbase != -1) { return (gbase + (p->gpio - OLDXIOBASE));