mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-16 02:31:06 +00:00
patch #10030: linuxspi: Support inverted GPIO pin
Submitted by Alex Sverdlin: * linuxspi.c (linuxspi_open): Clear the inversion mask on request and set default state to avoid short glitches on the GPIO line. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1494 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
@@ -164,7 +164,8 @@ static int linuxspi_open(PROGRAMMER *pgm, char *port)
|
||||
|
||||
strcpy(req.consumer_label, progname);
|
||||
req.lines = 1;
|
||||
req.lineoffsets[0] = pgm->pinno[PIN_AVR_RESET];
|
||||
req.lineoffsets[0] = pgm->pinno[PIN_AVR_RESET] & ~PIN_INVERSE;
|
||||
req.default_values[0] = !!(pgm->pinno[PIN_AVR_RESET] & PIN_INVERSE);
|
||||
req.flags = GPIOHANDLE_REQUEST_OUTPUT;
|
||||
|
||||
ret = ioctl(fd_gpiochip, GPIO_GET_LINEHANDLE_IOCTL, &req);
|
||||
|
||||
Reference in New Issue
Block a user