(part of patch #8176: butterfly.c (AVR109 protocol implementation) clean-up and bug-fixing)
* butterfly.c (butterfly_page_erase): Add dummy function to avoid segfault when writing to EEPROM. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1227 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
7e10c77ff3
commit
b22d8a5dcd
|
@ -1,3 +1,9 @@
|
||||||
|
2013-09-13 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
patch #8176: butterfly.c (AVR109 protocol implementation) clean-up and bug-fixing
|
||||||
|
* butterfly.c (butterfly_page_erase): Add dummy function to avoid
|
||||||
|
segfault when writing to EEPROM.
|
||||||
|
|
||||||
2013-09-13 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
2013-09-13 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
bug #35474 Feature request: print fuse values in safemode output
|
bug #35474 Feature request: print fuse values in safemode output
|
||||||
|
|
12
butterfly.c
12
butterfly.c
|
@ -544,6 +544,17 @@ static int butterfly_read_byte_eeprom(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int butterfly_page_erase(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m, unsigned int addr)
|
||||||
|
{
|
||||||
|
if (strcmp(m->desc, "flash") == 0)
|
||||||
|
return -1; /* not supported */
|
||||||
|
if (strcmp(m->desc, "eeprom") == 0)
|
||||||
|
return 0; /* nothing to do */
|
||||||
|
fprintf(stderr,
|
||||||
|
"%s: butterfly_page_erase() called on memory type \"%s\"\n",
|
||||||
|
progname, m->desc);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
static int butterfly_read_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
|
static int butterfly_read_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
|
||||||
unsigned long addr, unsigned char * value)
|
unsigned long addr, unsigned char * value)
|
||||||
|
@ -729,6 +740,7 @@ void butterfly_initpgm(PROGRAMMER * pgm)
|
||||||
* optional functions
|
* optional functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
pgm->page_erase = butterfly_page_erase;
|
||||||
pgm->paged_write = butterfly_paged_write;
|
pgm->paged_write = butterfly_paged_write;
|
||||||
pgm->paged_load = butterfly_paged_load;
|
pgm->paged_load = butterfly_paged_load;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue