avrftdi.c: Fail on wrong pin configuration

also change error return value of set_pin from 1 to -1.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1165 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Hannes Weisbach 2013-05-06 12:05:27 +00:00
parent 0efa2518e7
commit 9344a2ea8d
1 changed files with 3 additions and 2 deletions

View File

@ -230,7 +230,7 @@ static int set_pin(PROGRAMMER * pgm, int pinfunc, int value)
avrftdi_print(2, "%s info: Pin is zero, value: %d!\n",
progname, value);
*/
return 1;
return -1;
}
@ -645,7 +645,8 @@ static int avrftdi_open(PROGRAMMER * pgm, char *port)
break;
}
avrftdi_pin_setup(pgm);
if(avrftdi_pin_setup(pgm))
return -1;
/**********************************************
* set the ready LED and set our direction up *