Yes,it is possible to do so in firmware.But it is not best solution to do so.
You may have to use a Debouncer Component with the button.
You already only have got one pin for the switch and one pin for the LED. With fewer components it will not work. De-bouncing and pin-toggling you can do in software. Configure your pin without interrupt and hardware connection. Remember that the blue components and wires are just for documentation an do not represent any existing parts.
int prev = 0;
CyGlobalIntEnable; /* Enable global interrupts. */
if(current == 0 && current != prev)
prev = current;
} }} /*  END OF FILE */
Poorly commented and not well indented...
What are you telling us with the above code snippet? Does it work as expected?? Doesn't it???
It worked. Thank you.