New timers etc...
Signed-off-by: Michel Pollet <buserror@gmail.com>
2 files changed:
// 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);
#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"
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,