Commit bf47f08521ca2b9533d3ce84ca05df789a79e0a4
authorThomas Martens <thomas@defaultschuldiger.de>
Sat, 12 Oct 2019 20:04:20 +0000 (22:04 +0200)
committerThomas Martens <thomas@defaultschuldiger.de>
Sat, 12 Oct 2019 20:04:20 +0000 (22:04 +0200)
.com and .com_pin settings for timer0 in section .comp were missed

simavr/cores/sim_tiny13.c

index a741ef47f76b9b3f7d2f6931ccca98645294b07e..06017ed5fa41277c2ba9238e54ba9af77f27afcb 100644 (file)
@@ -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),