From: ga Date: Tue, 9 Feb 2021 21:26:36 +0000 (+0000) Subject: Do not set filter flag as handlers for IOPORT_IRQ_REG_PIN should be X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=5d1d1f99ba10c8fd8f2c5f1d8eff32ae24eb4e81;p=sx%2Fsimavr.git Do not set filter flag as handlers for IOPORT_IRQ_REG_PIN should be called on every read of the port pins, so they can set new values. --- diff --git a/simavr/sim/avr_ioport.c b/simavr/sim/avr_ioport.c index 9e936e3..ab632f1 100644 --- a/simavr/sim/avr_ioport.c +++ b/simavr/sim/avr_ioport.c @@ -282,7 +282,7 @@ void avr_ioport_init(avr_t * avr, avr_ioport_t * p) // allocate this module's IRQ avr_io_setirqs(&p->io, AVR_IOCTL_IOPORT_GETIRQ(p->name), IOPORT_IRQ_COUNT, NULL); - for (int i = 0; i < IOPORT_IRQ_COUNT; i++) + for (int i = 0; i < IOPORT_IRQ_REG_PIN; i++) p->io.irq[i].flags |= IRQ_FLAG_FILTERED; avr_register_io_write(avr, p->r_port, avr_ioport_write, p);