Fix linuxspi default port

If no port is specified, Avrdude will try to use the default port specified in avrdude.conf. If not present, use port specified in linuxspi.c
This commit is contained in:
MCUdude
2022-04-10 23:36:53 +02:00
parent 60960ba590
commit 6fceea8f71
6 changed files with 26 additions and 3 deletions

View File

@@ -382,6 +382,7 @@ int main(int argc, char * argv [])
default_parallel[0] = 0;
default_serial[0] = 0;
default_spi[0] = 0;
default_bitclock = 0.0;
init_config();
@@ -921,6 +922,12 @@ int main(int argc, char * argv [])
case CONNTYPE_USB:
port = DEFAULT_USB;
break;
#ifdef HAVE_LINUXSPI
case CONNTYPE_SPI:
port = *default_spi ? default_spi : "unknown";
break;
#endif
}
}