Follow-up Comment #1, bug #35186 (project avrdude):
This patch does not work if the pin list contains pin 8 as the current
definition of PIN_INVERSE (in pindefs.h) is as follows:
#define PIN_INVERSE 0x80 /* flag for inverted pin in serbb */
#define PIN_MASK 0x7f
Better we change the definition to:
#include <limits.h>
#define PIN_INVERSE (1<<(WORD_BIT-1))
#define PIN_MASK (~(PIN_INVERSE))
OR
#define PIN_MASK (UINT_MAX>>1)
#define PIN_INVERSE (~(PIN_MASK))
WORD_BIT is the number of bits in an int. (This is 32 or even more. In case it
is only 16 this would break a lot more things in avrdude.)
UINT_MAX is 0xFFFFFFFF for 32 bit unsigned integer.
---
Also I think extending the grammar to allow "~ (1,2,3)" instead of the
proposed "~ 1,2,3" would be safer in case there will be implemented later pin
lists with only some pins inverted. Then the proposed solution would potential
break the connected hardware if pin lists are not corrected in the config
file.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?35186>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
_______________________________________________
avrdude-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev