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:
50451c7
)
Commit
68b1302585b8f7659a88536e626fd96b79ef325b
author
messani
<messani@gmail.com>
Fri, 28 Oct 2016 10:47:29 +0000
(12:47 +0200)
committer
GitHub
<noreply@github.com>
Fri, 28 Oct 2016 10:47:29 +0000
(12:47 +0200)
simavr/sim/avr_timer.c
patch
|
blob
|
history
|
download
diff --git
a/simavr/sim/avr_timer.c
b/simavr/sim/avr_timer.c
index 903c6547b71d43f5b723abe42e3afe926e62b2aa..fc5e4953baaf56a0686927a683faaf545456723d 100644
(file)
--- a/
simavr/sim/avr_timer.c
+++ b/
simavr/sim/avr_timer.c
@@
-462,7
+462,7
@@
avr_timer_write(
// to be synced. To obtain better simulation results
// p->tov_base type must be float or avr->frequency
// must be multiple of 32768.
- p->cs_div_value = (uint32_t)((
floa
t)avr->frequency * (1 << p->cs_div[new_cs]) / 32768);
+ p->cs_div_value = (uint32_t)((
uint64_
t)avr->frequency * (1 << p->cs_div[new_cs]) / 32768);
} else {
p->cs_div_value = 1 << p->cs_div[new_cs];
}