Fix gpio configuration parsing

This commit is contained in:
John Pitney 2016-11-19 13:46:43 -06:00
parent 1b4fe52ef0
commit ff3af47c34
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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]);