Fix gpio configuration parsing
This commit is contained in:
parent
1b4fe52ef0
commit
ff3af47c34
2
Makefile
2
Makefile
|
@ -19,7 +19,7 @@
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
INSTALL = /usr/bin/install
|
INSTALL = /usr/bin/install
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
LDFLAGS ?= -s
|
# LDFLAGS ?= -s
|
||||||
|
|
||||||
BINDIR = ${PREFIX}/bin/
|
BINDIR = ${PREFIX}/bin/
|
||||||
MANDIR = ${PREFIX}/share/man/man1
|
MANDIR = ${PREFIX}/share/man/man1
|
||||||
|
|
|
@ -99,7 +99,7 @@ gpio_parse_config (const char *params)
|
||||||
char* help;
|
char* help;
|
||||||
help = strstr(params,ops[i].name);
|
help = strstr(params,ops[i].name);
|
||||||
if (help)
|
if (help)
|
||||||
jtag_gpios[ops[i].num] = atoi(help+6);
|
jtag_gpios[ops[i].num] = atoi(help+4);
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
printf("gpio %s %d\n", ops[i].name,jtag_gpios[ops[i].num]);
|
printf("gpio %s %d\n", ops[i].name,jtag_gpios[ops[i].num]);
|
||||||
|
|
Loading…
Reference in New Issue