Commit d4192619 authored by Aurelio Colosimo's avatar Aurelio Colosimo

added skeleton for lib/conf.c

pp_parse_conf will receive the txt data read from conf file and will compile
the ppg->links structs. File open is supposed to be done outside the proper
parser here defined, so that any architecture, even those with no filesystems,
can make use of the parser, supposing the configuration txt data is saved
elsewhere (e.g. in a E2PROM)
Signed-off-by: Aurelio Colosimo's avatarAurelio Colosimo <aurelio@aureliocolosimo.it>
parent 9c4b4fab
......@@ -225,6 +225,8 @@ extern int pp_close_instance(struct pp_instance *ppi);
extern int pp_parse_cmdline(struct pp_instance *ppi, int argc, char **argv);
extern int pp_parse_conf(struct pp_globals *ppg, char *conf, int len);
/* Servo */
extern void pp_init_clock(struct pp_instance *ppi);
extern void pp_update_delay(struct pp_instance *ppi,
......
/*
* Aurelio Colosimo for CERN, 2013 -- GNU LGPL v2.1 or later
*/
#include <ppsi/ppsi.h>
/* Parse configuration (e.g. coming from /etc/ppsi.conf file) */
int pp_parse_conf(struct pp_globals *ppg, char *conf, int len)
{
/* FIXME: implement pp_parse_conf, setting ppg->links and ppg->nlinks
* as stated in the file */
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment