mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-18 11:24:42 +00:00
* buspirate.c: Replace GNU-only %as with %s in sscanf call.
* ser_win32.c(ser_set_dtr_rts): Fixed typo in parameter name. * NEWS: Announce BusPirate. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@865 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
@@ -174,12 +174,12 @@ static int buspirate_start_spi_mode(struct programmer_t *pgm)
|
||||
{
|
||||
int spi_cmd = -1;
|
||||
int cmd;
|
||||
char *rcvd, *mode, buf[5];
|
||||
char *rcvd, mode[11], buf[5];
|
||||
|
||||
buspirate_send(pgm, "M\n");
|
||||
while(1) {
|
||||
rcvd = buspirate_readline(pgm, NULL, 0);
|
||||
if (spi_cmd == -1 && sscanf(rcvd, "%d. %as", &cmd, &mode)) {
|
||||
if (spi_cmd == -1 && sscanf(rcvd, "%d. %10s", &cmd, mode)) {
|
||||
if (strcmp(mode, "SPI") == 0)
|
||||
spi_cmd = cmd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user