mirror of https://github.com/nirenjan/libx52.git
Add stub to apply configuration
parent
ac8bb6cdd9
commit
50f77119ff
|
@ -40,3 +40,15 @@ void x52d_config_load(const char *cfg_file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define CFG(section, key, name, parser, def) \
|
||||||
|
static void x52d_cfg_set_ ## section ## _ ## key(typeof(x52d_config . name) param) \
|
||||||
|
{ \
|
||||||
|
PINELOG_TRACE("Calling set " #section ":" #key); \
|
||||||
|
}
|
||||||
|
#include "x52d_config.def"
|
||||||
|
|
||||||
|
void x52d_config_apply(void)
|
||||||
|
{
|
||||||
|
#define CFG(section, key, name, parser, def) x52d_cfg_set_ ## section ## _ ## key(x52d_config . name);
|
||||||
|
#include "x52d_config.def"
|
||||||
|
}
|
||||||
|
|
|
@ -48,5 +48,6 @@ int x52d_config_apply_overrides(struct x52d_config *cfg);
|
||||||
void x52d_config_clear_overrides(void);
|
void x52d_config_clear_overrides(void);
|
||||||
|
|
||||||
void x52d_config_load(const char *cfg_file);
|
void x52d_config_load(const char *cfg_file);
|
||||||
|
void x52d_config_apply(void);
|
||||||
|
|
||||||
#endif // !defined X52D_CONFIG_H
|
#endif // !defined X52D_CONFIG_H
|
||||||
|
|
|
@ -135,6 +135,9 @@ int main(int argc, char **argv)
|
||||||
// Start device threads
|
// Start device threads
|
||||||
x52d_dev_init();
|
x52d_dev_init();
|
||||||
|
|
||||||
|
// Apply configuration
|
||||||
|
x52d_config_apply();
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
// TODO: Replace with main event loop
|
// TODO: Replace with main event loop
|
||||||
// Let all threads run in background forever
|
// Let all threads run in background forever
|
||||||
|
|
Loading…
Reference in New Issue