mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-18 03:14:42 +00:00
Change definition of NO_PIN to 1+PIN_MAX (#1231)
Fixes bug #1228 that gpio 0 could not be used by the linuxgpio system. * Add sanity checks * Loop over defined pins only Co-authored-by: Stefan Rueger <stefan.rueger@urclocks.com>
This commit is contained in:
@@ -224,6 +224,9 @@ static int set_frequency(avrftdi_t* ftdi, uint32_t freq)
|
||||
* here.
|
||||
*/
|
||||
static int set_pin(const PROGRAMMER *pgm, int pinfunc, int value) {
|
||||
if(pinfunc < 0 || pinfunc >= N_PINS)
|
||||
return -1;
|
||||
|
||||
avrftdi_t* pdata = to_pdata(pgm);
|
||||
struct pindef_t pin = pgm->pin[pinfunc];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user