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:
parent
bb7c8a299a
commit
0ccd81eb98
|
@ -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>
|
||||
|
||||
bug #28516: Linux/Dragon: Error message on exit
|
||||
|
|
|
@ -174,7 +174,7 @@ static int serbb_getpin(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;
|
||||
|
||||
serbb_setpin(pgm, pin, 1);
|
||||
|
|
|
@ -223,8 +223,8 @@ static int serbb_getpin(PROGRAMMER * pgm, int pin)
|
|||
|
||||
static int serbb_highpulsepin(PROGRAMMER * pgm, int pin)
|
||||
{
|
||||
if (pin < 1 || pin > 7)
|
||||
return -1;
|
||||
if ( (pin & PIN_MASK) < 1 || (pin & PIN_MASK) > DB9PINS )
|
||||
return -1;
|
||||
|
||||
serbb_setpin(pgm, pin, 1);
|
||||
if (pgm->ispdelay > 1)
|
||||
|
|
Loading…
Reference in New Issue