Commit 6c633385 authored by Davide Ciminaghi's avatar Davide Ciminaghi Committed by Alessandro Rubini

conf: introduce "servo-pi" config option

This is equivalent to -a NUMBER,NUMBER command line option, which will be
removed.
Signed-off-by: Davide Ciminaghi's avatarDavide Ciminaghi <ciminaghi@gnudd.com>
parent dff43b05
......@@ -183,6 +183,20 @@ static int f_vlan(int lineno, struct pp_globals *ppg, union pp_cfg_arg *arg)
return 0;
}
static int f_servo_pi(int lineno, struct pp_globals *ppg, union pp_cfg_arg *arg)
{
int n1, n2;
CHECK_PPI(0);
n1 = arg->i2[0]; n2 = arg->i2[1];
/* no negative or zero attenuation */
if (n1 < 1 || n2 < 1)
return -1;
GOPTS(ppg)->ap = n1;
GOPTS(ppg)->ai = n2;
return 0;
}
/* These are the tables for the parser */
static struct pp_argname arg_proto[] = {
{"raw", PPSI_PROTO_RAW},
......@@ -213,6 +227,7 @@ static struct pp_argline pp_global_arglines[] = {
{ f_diag, "diagnostics", ARG_STR},
{ f_class, "clock-class", ARG_INT},
{ f_accuracy, "clock-accuracy", ARG_INT},
{ f_servo_pi, "servo-pi", ARG_INT2},
{}
};
......
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