Skip to content

Commit

Permalink
fix erase chip bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
nimaltd authored Aug 2, 2020
1 parent d508953 commit b747cf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ee24.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ bool ee24_eraseChip(void)
const uint8_t eraseData[32] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF\
, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
uint32_t bytes = 0;
while ( bytes < (_EEPROM_SIZE_KBIT / 8) * 1024)
while ( bytes < (_EEPROM_SIZE_KBIT * 256))
{
if (ee24_write(bytes, (uint8_t*)eraseData, sizeof(eraseData), 100) == false)
return false;
Expand Down

0 comments on commit b747cf9

Please sign in to comment.