diff --git a/src/gpio.c b/src/gpio.c index 49bee0d..ad74f34 100644 --- a/src/gpio.c +++ b/src/gpio.c @@ -144,7 +144,7 @@ int gpio_init(struct EG25Manager *manager, toml_table_t *config[]) if (!gpio_config[EG25_CONFIG_SYS]) g_error("Default config file lacks the 'gpio' section!"); - /* + /* * The system config could have the `chips` key, but the user one * could still use the old format! In order to avoid problems, we * should use the new format only if: @@ -196,8 +196,13 @@ int gpio_init(struct EG25Manager *manager, toml_table_t *config[]) for (i = 0; i < GPIO_IN_COUNT; i++) { toml_table_t *table; toml_datum_t chip, line; - if (!config_get_table(gpio_config, gpio_in_names[i], &table)) + + if (!config_get_table(gpio_config, gpio_in_names[i], &table)) { + // BH edition don't have the STATUS line connected, ignore it + if (manager->use_libusb && g_strcmp0(gpio_in_names[i], "status") == 0) + continue; g_error("Unable to get config for input GPIO '%s'", gpio_in_names[i]); + } chip = toml_int_in(table, "chip"); if (!chip.ok || chip.u.i < 0 || chip.u.i > 2)