Commit 58396a3ec11232a967ba5aca3bf49ad8f859e091
authorMichel Pollet <buserror@gmail.com>
Sun, 20 Dec 2009 23:08:31 +0000 (23:08 +0000)
committerMichel Pollet <buserror@gmail.com>
Sun, 20 Dec 2009 23:08:31 +0000 (23:08 +0000)
New timers etc...

Signed-off-by: Michel Pollet <buserror@gmail.com>
2 files changed:
examples/board_timer_64led/atmega168_timer_64led.c
examples/board_timer_64led/timer_64led.c

index 23a11dbb9bb777d9d0d75116c0455207f8e6ef09..0eb327006635d1d37a69f5e142c32f545cdfad8f 100644 (file)
@@ -94,6 +94,7 @@ void tick_init()
        // needs to do that before changing the timer registers
        // ASYNC timer using a 32k crystal
        ASSR |= (1 << AS2);
+    TCCR2A = (1 << WGM21);
     TCCR2B = (3 << CS20);
     OCR2A = 127;
     TIMSK2  |= (1 << OCIE2A);
index 5fa73aae70a9d0c21cf228f61da3cfdcc2d2eabf..f85c285e4aef6f8acd1bc865c3a027d7853c7ff2 100644 (file)
@@ -29,7 +29,7 @@
 #include "sim_avr.h"
 #include "avr_ioport.h"
 #include "avr_spi.h"
-#include "avr_timer8.h"
+#include "avr_timer.h"
 #include "sim_elf.h"
 #include "sim_gdb.h"
 #include "sim_vcd_file.h"
@@ -249,7 +249,7 @@ int main(int argc, char *argv[])
        avr_connect_irq(i_reset, shifter.irq + IRQ_HC595_IN_RESET);
        avr_connect_irq(i_latch, shifter.irq + IRQ_HC595_IN_LATCH);
 
-       avr_irq_t * i_pwm = avr_io_getirq(avr, AVR_IOCTL_TIMER8_GETIRQ('0'), TIMER8_IRQ_OUT_PWM0);
+       avr_irq_t * i_pwm = avr_io_getirq(avr, AVR_IOCTL_TIMER_GETIRQ('0'), TIMER_IRQ_OUT_PWM0);
        avr_irq_register_notify(
                i_pwm,
                pwm_changed_hook,