bug #27505: serbb_posix does not cope with inverted pins

* serbb_posix (serbb_highpulsepin): apply PIN_MASK when
checking pin numbers.
* serbb_win32 (serbb_highpulsepin): (Dito.)




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@896 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch 2010-01-08 16:31:54 +00:00
parent ad8b6a45da
commit 4b515d005c
3 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2010-01-08 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
bug #27505: serbb_posix does not cope with inverted pins
* serbb_posix (serbb_highpulsepin): apply PIN_MASK when
checking pin numbers.
* serbb_win32 (serbb_highpulsepin): (Dito.)
2010-01-08 Joerg Wunsch <j.gnu@uriah.heep.sax.de> 2010-01-08 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
bug #28516: Linux/Dragon: Error message on exit bug #28516: Linux/Dragon: Error message on exit

View File

@ -174,7 +174,7 @@ static int serbb_getpin(PROGRAMMER * pgm, int pin)
static int serbb_highpulsepin(PROGRAMMER * pgm, int pin) static int serbb_highpulsepin(PROGRAMMER * pgm, int pin)
{ {
if ( pin < 1 || pin > DB9PINS ) if ( (pin & PIN_MASK) < 1 || (pin & PIN_MASK) > DB9PINS )
return -1; return -1;
serbb_setpin(pgm, pin, 1); serbb_setpin(pgm, pin, 1);

View File

@ -223,7 +223,7 @@ static int serbb_getpin(PROGRAMMER * pgm, int pin)
static int serbb_highpulsepin(PROGRAMMER * pgm, int pin) static int serbb_highpulsepin(PROGRAMMER * pgm, int pin)
{ {
if (pin < 1 || pin > 7) if ( (pin & PIN_MASK) < 1 || (pin & PIN_MASK) > DB9PINS )
return -1; return -1;
serbb_setpin(pgm, pin, 1); serbb_setpin(pgm, pin, 1);