From 5d1d1f99ba10c8fd8f2c5f1d8eff32ae24eb4e81 Mon Sep 17 00:00:00 2001 From: ga Date: Tue, 9 Feb 2021 21:26:36 +0000 Subject: [PATCH] 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. --- simavr/sim/avr_ioport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5