Forum Discussion
Altera_Forum
Honored Contributor
13 years agoIOWR_ALTERA_AVALON_PIO_IRQ_MASK(button_base_address,1); // enable irq
IOWR_ALTERA_AVALON_PIO_EDGE_CAP(button_base_address, 1); // clear irq Infact you are using PIO bit 0, then mask = 1. For clarity: if you had a 8 bit wide PIO and you connected the button to pio_input[6], then you'd had irq_bit_mask=0x40 IRQ line nr is involved only in alt_irq_register() call.