* buspirate.c: Added compatibility with BusPirate "NewUI" firmware 5.x

(contributed by Kari Knuuttila)



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@946 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
mludvig 2010-07-18 13:15:07 +00:00
parent 9c728bff1a
commit f474ab0425
2 changed files with 13 additions and 3 deletions

View File

@ -1,5 +1,10 @@
2010-07-19 Michal Ludvig <mludvig@logix.net.nz>
* buspirate.c: Added compatibility with BusPirate "NewUI" firmware 5.x
(contributed by Kari Knuuttila)
2010-07-12 Nils Springob <nils@nicai-systems.de>
* avrdude.conf.in (atmega88p): New device.
2010-06-03 Joerg Wunsch <j.gnu@uriah.heep.sax.de>

View File

@ -256,8 +256,9 @@ static int buspirate_send(struct programmer_t *pgm, char *str)
static int buspirate_is_prompt(char *str)
{
/* Prompt ends with '>' all other input probably ends with '\n' */
return (str[strlen(str) - 1] == '>');
/* Prompt ends with '>' or '> '
* all other input probably ends with '\n' */
return (str[strlen(str) - 1] == '>' || str[strlen(str) - 2] == '>');
}
static int buspirate_expect(struct programmer_t *pgm, char *send,
@ -536,6 +537,7 @@ static int buspirate_start_spi_mode_ascii(struct programmer_t *pgm)
static void buspirate_enable(struct programmer_t *pgm)
{
unsigned char *reset_str = "#\n";
unsigned char *accept_str = "y\n";
char *rcvd;
int fw_v1 = 0, fw_v2 = 0;
int rc, print_banner = 0;
@ -559,6 +561,9 @@ static void buspirate_enable(struct programmer_t *pgm)
buspirate_enable(pgm);
return;
}
if (strncmp(rcvd, "Are you sure?", 13) == 0) {
buspirate_send_bin(pgm, accept_str, strlen(accept_str));
}
if (strncmp(rcvd, "RESET", 5) == 0) {
print_banner = 1;
continue;