It is not exactly the same
I use the isr and dsr routine
The source of interrupt is masked in the isr "cyg_interrupt_mask(vector);"
and unmasked in the dsr " cyg_interrupt_unmask(vector);"
In your code you use only the isr routine
so mask and unmask in the isr
or do not mask the source of the interrupt,
the edgecapture register masks for you until it is reset
the isr could be :
cyg_uint32 isr_pio( cyg_vector_t vector ,cyg_addrword_t data)
{
// cyg_interrupt_mask(vector);
cyg_interrupt_acknowledge(vector);
IOWR(BUTTON_PIO_BASE , 3, 0x00); // Reset the edgecapture register
ledpio = 0x8; //
IOWR (LED_PIO_BASE , 0, ledpio);
return(CYG_ISR_HANDLED);
}