fix compile error
authorJochen Kiemes <jochen@kiemes.de>
Mon, 11 Jan 2021 22:53:05 +0000 (23:53 +0100)
committerJochen Kiemes <jochen@kiemes.de>
Mon, 11 Jan 2021 22:53:05 +0000 (23:53 +0100)
simavr/sim/avr_timer.c

index 66a47ae..827261d 100644 (file)
@@ -754,9 +754,9 @@ avr_timer_write_pending(
        // avr_core_watch_write(avr, addr, v); // This raises flags instead of clearing it.
 
        // clear any interrupts & flags
-       if (avr_regbit_from_value(avr, p->overflow, v))
+       if (avr_regbit_from_value(avr, p->overflow.raised, v))
                avr_clear_interrupt_if(avr, &p->overflow, ov);
-       if (avr_regbit_from_value(avr, p->icr, v))
+       if (avr_regbit_from_value(avr, p->icr.raised, v))
                avr_clear_interrupt_if(avr, &p->icr, ic);
 
        for (int compi = 0; compi < AVR_TIMER_COMP_COUNT; compi++)