aboutsummaryrefslogtreecommitdiff
path: root/src/peripherals/eeprom.ts
diff options
context:
space:
mode:
authorUri Shaked2020-07-16 20:39:27 +0300
committerUri Shaked2020-07-16 20:39:27 +0300
commite319f6f7f487d4ef27bf89c26e04646aa3b9b4db (patch)
tree9dcc89b8f96e2013551bba2d3f6d44eb28ee493c /src/peripherals/eeprom.ts
parent0.10.0 (diff)
downloadavr8js-e319f6f7f487d4ef27bf89c26e04646aa3b9b4db.tar.gz
avr8js-e319f6f7f487d4ef27bf89c26e04646aa3b9b4db.tar.bz2
avr8js-e319f6f7f487d4ef27bf89c26e04646aa3b9b4db.zip
fix(eeprom): EEPROM write fails after first attempt
close #54
Diffstat (limited to '')
-rw-r--r--src/peripherals/eeprom.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/peripherals/eeprom.ts b/src/peripherals/eeprom.ts
index 97ca178..0301701 100644
--- a/src/peripherals/eeprom.ts
+++ b/src/peripherals/eeprom.ts
@@ -101,7 +101,7 @@ export class AVREEPROM {
return true;
}
// Check for write-in-progress
- if (this.writeCompleteCycles) {
+ if (this.cpu.cycles < this.writeCompleteCycles) {
return true;
}