aboutsummaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorUri Shaked2020-04-30 13:07:59 +0300
committerUri Shaked2020-04-30 13:07:59 +0300
commitad66119d67694368e9d2fda43f63f9bbbf8c6eff (patch)
tree866f021c386a81cc9278fffbcbe913f1dfc4cb39 /demo
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
Diffstat (limited to 'demo')
-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();
}
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.