src: implement config file lookup and initial parsing

This commit prepares the use of device-specific configuration files. 
These files should be named after the device-tree `compatible` string 
with the `toml` extension.

`eg25-manager` will search for config files in 
`<prefix>/etc/eg25-manager` first (or `/etc/eg25-manager` if prefix is 
`/usr`), then in `<prefix>/share/eg25-manager`.
This commit is contained in:
Arnaud Ferraris
2021-02-20 15:26:06 +01:00
parent c92746e875
commit d9256251fd
13 changed files with 90 additions and 27 deletions

View File

@@ -92,7 +92,7 @@ int gpio_sequence_resume(struct EG25Manager *manager)
return 0;
}
int gpio_init(struct EG25Manager *manager)
int gpio_init(struct EG25Manager *manager, toml_table_t *config)
{
int i, ret;
unsigned *gpio_in_idx;