add: invert gpios

This commit is contained in:
Tobias Reisinger 2020-04-18 02:09:50 +02:00
parent 27df642ee6
commit 82f43080ac
5 changed files with 27 additions and 2 deletions

View file

@ -48,6 +48,11 @@ helper_load_config(IniDispatch *disp, void *config_void)
config->relay_configs[i].pin = atoi(disp->value);
return 0;
}
if(CONFINI_IS_KEY(relay_section_name, "inverted"))
{
config->relay_configs[i].inverted = atoi(disp->value);
return 0;
}
if(CONFINI_IS_KEY(relay_section_name, "driver"))
{
if(strcasecmp(disp->value, "gpio") == 0)