aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUri Shaked2020-04-30 13:07:59 +0300
committerUri Shaked2020-04-30 13:07:59 +0300
commitad66119d67694368e9d2fda43f63f9bbbf8c6eff (patch)
tree866f021c386a81cc9278fffbcbe913f1dfc4cb39
parentfix(timer): Reading TCNT in 2-cycle instructions (diff)
downloadavr8js-ad66119d67694368e9d2fda43f63f9bbbf8c6eff.tar.gz
avr8js-ad66119d67694368e9d2fda43f63f9bbbf8c6eff.tar.bz2
avr8js-ad66119d67694368e9d2fda43f63f9bbbf8c6eff.zip
feat(demo): add timer 2 to simulation
-rw-r--r--demo/src/execute.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/demo/src/execute.ts b/demo/src/execute.ts
index 7d56275..40cc996 100644
--- a/demo/src/execute.ts
+++ b/demo/src/execute.ts
@@ -4,6 +4,7 @@ import {
CPU,
timer0Config,
timer1Config,
+ timer2Config,
AVRIOPort,
AVRUSART,
portBConfig,
@@ -22,6 +23,7 @@ export class AVRRunner {
readonly cpu: CPU;
readonly timer0: AVRTimer;
readonly timer1: AVRTimer;
+ readonly timer2: AVRTimer;
readonly portB: AVRIOPort;
readonly portC: AVRIOPort;
readonly portD: AVRIOPort;
@@ -35,6 +37,7 @@ export class AVRRunner {
this.cpu = new CPU(this.program);
this.timer0 = new AVRTimer(this.cpu, timer0Config);
this.timer1 = new AVRTimer(this.cpu, timer1Config);
+ this.timer2 = new AVRTimer(this.cpu, timer2Config);
this.portB = new AVRIOPort(this.cpu, portBConfig);
this.portC = new AVRIOPort(this.cpu, portCConfig);
this.portD = new AVRIOPort(this.cpu, portDConfig);
@@ -49,6 +52,7 @@ export class AVRRunner {
avrInstruction(this.cpu);
this.timer0.tick();
this.timer1.tick();
+ this.timer2.tick();
this.usart.tick();
}