214 return doc.allocateElement(
"dummy");
217 const uint8_t* data = eeprom.
backdoor();
218 EmuTime time = EmuTime::zero();
222 CHECK(data[addr] == 255);
226 write(eeprom, time, 45, 123);
227 CHECK(!waitIdle(eeprom, time));
229 CHECK(data[addr] == 255);
233 write_enable(eeprom, time);
234 CHECK(!waitIdle(eeprom, time));
235 write(eeprom, time, 45, 123);
236 CHECK(waitIdle(eeprom, time));
238 uint8_t expected = (addr == 45) ? 123 : 255;
239 CHECK(data[addr] == expected);
243 CHECK(
int(read(eeprom, time, 45)) == 123);
244 CHECK(!waitIdle(eeprom, time));
245 CHECK(
int(read(eeprom, time, 46)) == 255);
246 CHECK(!waitIdle(eeprom, time));
251 write(eeprom, time, 45, 20);
252 CHECK(waitIdle(eeprom, time));
254 uint8_t expected = (addr == 45) ? 20 : 255;
255 CHECK(data[addr] == expected);
259 erase(eeprom, time, 99);
260 CHECK(waitIdle(eeprom, time));
262 uint8_t expected = (addr == 45) ? 20 : 255;
263 CHECK(data[addr] == expected);
267 erase(eeprom, time, 45);
268 CHECK(waitIdle(eeprom, time));
270 CHECK(data[addr] == 255);
274 write_all(eeprom, time, 77);
275 CHECK(waitIdle(eeprom, time));
277 CHECK(data[addr] == 77);
282 CHECK(waitIdle(eeprom, time));
284 CHECK(waitIdle(eeprom, time));
285 write(eeprom, time, 0, 22);
286 CHECK(waitIdle(eeprom, time));
289 write_disable(eeprom, time);
290 CHECK(!waitIdle(eeprom, time));
291 write(eeprom, time, 1, 33);
292 CHECK(!waitIdle(eeprom, time));
294 uint8_t expected = (addr == 126) ? 5
298 CHECK(data[addr] == expected);
302 std::array<uint8_t, 6> buf;
304 CHECK(!waitIdle(eeprom, time));
313 erase_all(eeprom, time);
314 CHECK(!waitIdle(eeprom, time));
315 CHECK(data[0] == 22);
318 write_enable(eeprom, time);
319 CHECK(!waitIdle(eeprom, time));
320 erase_all(eeprom, time);
321 CHECK(waitIdle(eeprom, time));
323 CHECK(data[addr] == 255);