43 static const unsigned char nullb[COFFEE_SECTOR_SIZE < 32 ? COFFEE_SECTOR_SIZE : 32] = {0};
46 cfs_coffee_arch_erase(uint16_t sector)
49 for(i = 0; i <= COFFEE_SECTOR_SIZE -
sizeof(nullb); i +=
sizeof(nullb)) {
50 eeprom_write(COFFEE_START + sector * COFFEE_SECTOR_SIZE + i,
51 (
unsigned char *)nullb,
sizeof(nullb));
53 if(i < COFFEE_SECTOR_SIZE) {
54 eeprom_write(COFFEE_START + sector * COFFEE_SECTOR_SIZE + i,
55 (
unsigned char *)nullb, COFFEE_SECTOR_SIZE - i);