Lab_1/part_1/interrupt_counter_tut_2B.c
void BTN_Intr_Handler(void *InstancePtr)
{
	// Disable GPIO interrupts
	XGpio_InterruptDisable(&BTNInst, BTN_INT);
	// Ignore additional button presses
	if ((XGpio_InterruptGetStatus(&BTNInst) & BTN_INT) !=
			BTN_INT) {
			return;
		}
	btn_value = XGpio_DiscreteRead(&BTNInst, 1);
	// Increment counter based on button value

	led_data = led_data + btn_value;

    XGpio_DiscreteWrite(&LEDInst, 1, led_data);
    (void)XGpio_InterruptClear(&BTNInst, BTN_INT);
    // Enable GPIO interrupts
    XGpio_InterruptEnable(&BTNInst, BTN_INT);
}
//----------------------------------------------------
// INTERRUPT HANDLER FUNCTIONS
// - called by the timer, button interrupt, performs
// - LED flashing
//----------------------------------------------------

INTERRUPT HANDLER FUNCTIONS
called by the timer, button interrupt, performs
LED flashing
INTERRUPT HANDLER FUNCTIONS called by the timer button interrupt performs LED flashing
void BTN_Intr_Handler(void *InstancePtr)
{
	XGpio_InterruptDisable(&BTNInst, BTN_INT);
	if ((XGpio_InterruptGetStatus(&BTNInst) & BTN_INT) !=
			BTN_INT) {
			return;
		}
	btn_value = XGpio_DiscreteRead(&BTNInst, 1);
	led_data = led_data + btn_value;
    XGpio_DiscreteWrite(&LEDInst, 1, led_data);
    (void)XGpio_InterruptClear(&BTNInst, BTN_INT);
    XGpio_InterruptEnable(&BTNInst, BTN_INT);
}
void BTN_Intr_Handler ( void * InstancePtr ) { XGpio_InterruptDisable ( & BTNInst , BTN_INT ) ; if ( ( XGpio_InterruptGetStatus ( & BTNInst ) & BTN_INT ) != BTN_INT ) { return ; } btn_value = XGpio_DiscreteRead ( & BTNInst , 1 ) ; led_data = led_data + btn_value ; XGpio_DiscreteWrite ( & LEDInst , 1 , led_data ) ; ( void ) XGpio_InterruptClear ( & BTNInst , BTN_INT ) ; XGpio_InterruptEnable ( & BTNInst , BTN_INT ) ; }
INTERRUPT HANDLER FUNCTIONS
 called by the timer, button interrupt, performs
 LED flashing
INTERRUPT HANDLER FUNCTIONS called by the timer button interrupt performs LED flashing
// Disable GPIO interrupts
 // Ignore additional button presses
 // Increment counter based on button value
 // Enable GPIO interrupts
