add multi-expander

This commit is contained in:
Philippe G
2021-12-01 19:15:29 -08:00
parent f655244039
commit 2a9d87b6c5
3 changed files with 26 additions and 19 deletions

View File

@@ -70,9 +70,9 @@ void services_init(void) {
}
#endif
// create GPIO expander
const gpio_exp_config_t * gpio_exp_config = config_gpio_exp_get();
if (gpio_exp_config) gpio_exp_create(gpio_exp_config);
// create GPIO expanders
const gpio_exp_config_t* gpio_exp_config;
for (int count = 0; (gpio_exp_config = config_gpio_exp_get(count)); count++) gpio_exp_create(gpio_exp_config);
// set potential power GPIO (a GPIO-powered expander might be an issue)
parse_set_GPIO(set_power_gpio);