projects
/
sx
/
simavr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
regExp
home
|
summary
|
tags
|
heads
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
raw
|
patch
| inline |
side by side
(parent:
4055170
)
Commit
0d3f95abd5081d99eee487223c01ff31311d3f0b
author
Michel Pollet
<buserror@gmail.com>
Mon, 2 Aug 2010 21:38:44 +0000
(22:38 +0100)
committer
Michel Pollet
<buserror@gmail.com>
Mon, 2 Aug 2010 21:38:44 +0000
(22:38 +0100)
They lack WGM bits
Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/sim/avr_timer.c
patch
|
blob
|
history
|
download
diff --git
a/simavr/sim/avr_timer.c
b/simavr/sim/avr_timer.c
index 5d658a5be94201806f648606ad4e509e57a43214..be213384910b2d82709e711bc78fe432d0a7bfc9 100644
(file)
--- a/
simavr/sim/avr_timer.c
+++ b/
simavr/sim/avr_timer.c
@@
-407,7
+407,8
@@
void avr_timer_init(avr_t * avr, avr_timer_t * p)
avr_register_vector(avr, &p->overflow);
avr_register_vector(avr, &p->icr);
- avr_register_io_write(avr, p->wgm[0].reg, avr_timer_write, p);
+ if (p->wgm[0].reg) // these are not present on older AVRs
+ avr_register_io_write(avr, p->wgm[0].reg, avr_timer_write, p);
avr_register_io_write(avr, p->cs[0].reg, avr_timer_write, p);
// this assumes all the "pending" interrupt bits are in the same