XilinxProcessorIPLib/drivers/gpiops/examples/xgpiops_intr_example.c
static void IntrHandler(void *CallBackRef, u32 Bank, u32 Status)
{
	XGpioPs *Gpio = (XGpioPs *)CallBackRef;
	u32 DataRead;

	/* Push the switch button */
	DataRead = XGpioPs_ReadPin(Gpio, Input_Pin);
	if (DataRead != 0) {
		XGpioPs_SetDirectionPin(Gpio, Output_Pin, 1);
		XGpioPs_SetOutputEnablePin(Gpio, Output_Pin, 1);
		XGpioPs_WritePin(Gpio, Output_Pin, DataRead);
		AllButtonsPressed = TRUE;
	}
}
/****************************************************************************/
/**
* This function is the user layer callback function for the bank 0 interrupts of
* the GPIO device. It checks if all the switches have been pressed to stop the
* interrupt processing and exit from the example.
*
* @param	CallBackRef is a pointer to the upper layer callback reference.
* @param	Status is the Interrupt status of the GPIO bank.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This function is the user layer callback function for the bank 0 interrupts of
the GPIO device. It checks if all the switches have been pressed to stop the
interrupt processing and exit from the example.
This function is the user layer callback function for the bank 0 interrupts of the GPIO device . It checks if all the switches have been pressed to stop the interrupt processing and exit from the example .
static void IntrHandler(void *CallBackRef, u32 Bank, u32 Status)
{
	XGpioPs *Gpio = (XGpioPs *)CallBackRef;
	u32 DataRead;
	DataRead = XGpioPs_ReadPin(Gpio, Input_Pin);
	if (DataRead != 0) {
		XGpioPs_SetDirectionPin(Gpio, Output_Pin, 1);
		XGpioPs_SetOutputEnablePin(Gpio, Output_Pin, 1);
		XGpioPs_WritePin(Gpio, Output_Pin, DataRead);
		AllButtonsPressed = TRUE;
	}
}
static void IntrHandler ( void * CallBackRef , u32 Bank , u32 Status ) { XGpioPs * Gpio = ( XGpioPs * ) CallBackRef ; u32 DataRead ; DataRead = XGpioPs_ReadPin ( Gpio , Input_Pin ) ; if ( DataRead != 0 ) { XGpioPs_SetDirectionPin ( Gpio , Output_Pin , 1 ) ; XGpioPs_SetOutputEnablePin ( Gpio , Output_Pin , 1 ) ; XGpioPs_WritePin ( Gpio , Output_Pin , DataRead ) ; AllButtonsPressed = TRUE ; } }
This function is the user layer callback function for the bank 0 interrupts of
the GPIO device.
This function is the user layer callback function for the bank 0 interrupts of the GPIO device .
/* Push the switch button */