Remove butterfly_page_erase() function

... as it raises expectations but
  - Wrongly claims to page erase eeprom but doesn't
  - Prints errors messages for all other memory types only
This commit is contained in:
Stefan Rueger 2023-01-03 20:44:08 +00:00
parent eeb92b3c52
commit b5e4ea62b9
No known key found for this signature in database
GPG Key ID: B0B4F1FD86B1EC55
1 changed files with 0 additions and 10 deletions

View File

@ -537,15 +537,6 @@ static int butterfly_read_byte_eeprom(const PROGRAMMER *pgm, const AVRPART *p, c
return 0;
}
static int butterfly_page_erase(const PROGRAMMER *pgm, const AVRPART *p, const 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 */
pmsg_warning("called on memory type %s\n", m->desc);
return -1;
}
static int butterfly_read_byte(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *m,
unsigned long addr, unsigned char * value)
{
@ -736,7 +727,6 @@ void butterfly_initpgm(PROGRAMMER *pgm) {
* optional functions
*/
pgm->page_erase = butterfly_page_erase;
pgm->paged_write = butterfly_paged_write;
pgm->paged_load = butterfly_paged_load;