From bf47f08521ca2b9533d3ce84ca05df789a79e0a4 Mon Sep 17 00:00:00 2001 From: Thomas Martens Date: Sat, 12 Oct 2019 22:04:20 +0200 Subject: [PATCH] added OC0A/OC0B support for attiny13 .com and .com_pin settings for timer0 in section .comp were missed --- simavr/cores/sim_tiny13.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/simavr/cores/sim_tiny13.c b/simavr/cores/sim_tiny13.c index a741ef4..06017ed 100644 --- a/simavr/cores/sim_tiny13.c +++ b/simavr/cores/sim_tiny13.c @@ -106,6 +106,8 @@ static const struct mcu_t { .comp = { [AVR_TIMER_COMPA] = { .r_ocr = OCR0A, + .com = AVR_IO_REGBITS(TCCR0A, COM0A0, 0x3), + .com_pin = AVR_IO_REGBIT(PORTB, 0), .interrupt = { .enable = AVR_IO_REGBIT(TIMSK0, OCIE0A), .raised = AVR_IO_REGBIT(TIFR0, OCF0A), @@ -114,6 +116,8 @@ static const struct mcu_t { }, [AVR_TIMER_COMPB] = { .r_ocr = OCR0B, + .com = AVR_IO_REGBITS(TCCR0A, COM0B0, 0x3), + .com_pin = AVR_IO_REGBIT(PORTB, 1), .interrupt = { .enable = AVR_IO_REGBIT(TIMSK0, OCIE0B), .raised = AVR_IO_REGBIT(TIFR0, OCF0B), -- 2.39.5