Skip to content

Commit

Permalink
Fix prevAddress initialization bug that led to first page not being w…
Browse files Browse the repository at this point in the history
…ritten to locked EEPROMs
  • Loading branch information
gfoot committed Feb 27, 2021
1 parent 54ec860 commit 5a550bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions picoprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void writeImage(const uint8_t* buffer, size_t size)

if (size > gConfig.size) size = gConfig.size;

int prevAddress = -1;
int prevAddress = 0xffffff;
for (int address = 0; address < size; ++address)
{
if (gConfig.pageSize && prevAddress / gConfig.pageSize != address / gConfig.pageSize)
Expand Down Expand Up @@ -158,9 +158,9 @@ int main()
while (true)
{
printf("\n\n");
printf("PicoPROM v0.1 - Raspberry Pi Pico DIP-EEPROM programmer\n");
printf(" by George Foot, February 2021\n");
printf(" https://github.com/gfoot/picoprom\n");
printf("PicoPROM v0.11 - Raspberry Pi Pico DIP-EEPROM programmer\n");
printf(" by George Foot, February 2021\n");
printf(" https://github.com/gfoot/picoprom\n");
printf("\n\n");
printf("EEPROM Device: AT28C256\n");
printf(" Capacity: %dK bytes\n", gConfig.size / 1024);
Expand Down

0 comments on commit 5a550bb

Please sign in to comment.