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:
9090a5c
)
Commit
35f27285b51784ecee0e51518fb2a6c0b3c152d2
author
Tibor Peluch
<messani@gmail.com>
Thu, 1 Sep 2016 20:33:24 +0000
(22:33 +0200)
committer
Tibor Peluch
<messani@gmail.com>
Thu, 1 Sep 2016 20:33:24 +0000
(22:33 +0200)
- bsekisser was right, there must be ocr+1
simavr/sim/avr_timer.c
patch
|
blob
|
history
|
download
diff --git
a/simavr/sim/avr_timer.c
b/simavr/sim/avr_timer.c
index dba4e9bc0a36b9a60f0f6163b8cd7f439ffa4e77..779ce66ce06632ae3f6e67a97e912839e660114c 100644
(file)
--- a/
simavr/sim/avr_timer.c
+++ b/
simavr/sim/avr_timer.c
@@
-299,7
+299,7
@@
avr_timer_configure(
if (!p->comp[compi].r_ocr)
continue;
uint32_t ocr = _timer_get_ocr(p, compi);
- uint32_t comp_cycles = clock *
ocr
;
+ uint32_t comp_cycles = clock *
(ocr + 1)
;
p->comp[compi].comp_cycles = 0;