From b5e4ea62b92e2a1a4f8dc3eac5a7a82bd6520272 Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Tue, 3 Jan 2023 20:44:08 +0000 Subject: [PATCH] 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 --- src/butterfly.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/butterfly.c b/src/butterfly.c index 01643521..98894ea7 100644 --- a/src/butterfly.c +++ b/src/butterfly.c @@ -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;