Skip to content

Commit ad66119

Browse files
committed
feat(demo): add timer 2 to simulation
1 parent ad16db1 commit ad66119

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

demo/src/execute.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
CPU,
55
timer0Config,
66
timer1Config,
7+
timer2Config,
78
AVRIOPort,
89
AVRUSART,
910
portBConfig,
@@ -22,6 +23,7 @@ export class AVRRunner {
2223
readonly cpu: CPU;
2324
readonly timer0: AVRTimer;
2425
readonly timer1: AVRTimer;
26+
readonly timer2: AVRTimer;
2527
readonly portB: AVRIOPort;
2628
readonly portC: AVRIOPort;
2729
readonly portD: AVRIOPort;
@@ -35,6 +37,7 @@ export class AVRRunner {
3537
this.cpu = new CPU(this.program);
3638
this.timer0 = new AVRTimer(this.cpu, timer0Config);
3739
this.timer1 = new AVRTimer(this.cpu, timer1Config);
40+
this.timer2 = new AVRTimer(this.cpu, timer2Config);
3841
this.portB = new AVRIOPort(this.cpu, portBConfig);
3942
this.portC = new AVRIOPort(this.cpu, portCConfig);
4043
this.portD = new AVRIOPort(this.cpu, portDConfig);
@@ -49,6 +52,7 @@ export class AVRRunner {
4952
avrInstruction(this.cpu);
5053
this.timer0.tick();
5154
this.timer1.tick();
55+
this.timer2.tick();
5256
this.usart.tick();
5357
}
5458

0 commit comments

Comments
 (0)