From: Michel Pollet Date: Sun, 20 Dec 2009 23:08:31 +0000 (+0000) Subject: examples: Minor updates X-Git-Tag: v1.0a1~36 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=58396a3ec11232a967ba5aca3bf49ad8f859e091;p=sx%2Fsimavr.git examples: Minor updates New timers etc... Signed-off-by: Michel Pollet --- diff --git a/examples/board_timer_64led/atmega168_timer_64led.c b/examples/board_timer_64led/atmega168_timer_64led.c index 23a11db..0eb3270 100644 --- a/examples/board_timer_64led/atmega168_timer_64led.c +++ b/examples/board_timer_64led/atmega168_timer_64led.c @@ -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); diff --git a/examples/board_timer_64led/timer_64led.c b/examples/board_timer_64led/timer_64led.c index 5fa73aa..f85c285 100644 --- a/examples/board_timer_64led/timer_64led.c +++ b/examples/board_timer_64led/timer_64led.c @@ -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,