![]() |
intc
Xilinx SDK Drivers API Documentation
|
This file contains a self test example using the Interrupt Controller driver (XIntc) and hardware device.
Please reference other device driver examples to see more examples of how the Intc and interrupts can be used by a software application.
This example shows the use of the Interrupt Controller both with a PowerPC405 and MicroBlaze processor.
The TestApp Gen utility uses this file to perform the self test and setup of Intc for interrupts.
None
MODIFICATION HISTORY:
Ver Who Date Changes
1.00a sv 06/29/05 Created for Test App Integration 1.00c sn 05/09/06 Added Interrupt Setup Function 2.00a ktn 10/20/09 Updated to use HAL Processor APIs and minor changes as per coding guidelines. 3.6 ms 01/23/17 Added xil_printf statement in main function to ensure that "Successfully ran" and "Failed" strings are available in all examples. This is a fix for CR-965028.
Functions | |
int | IntcSelfTestExample (u16 DeviceId) |
This function runs a self-test on the driver/device. More... | |
int | IntcInterruptSetup (XIntc *IntcInstancePtr, u16 DeviceId) |
This function is used by the TestAppGen generated application to setup the interrupt controller. More... | |
int | main (void) |
This is the main function for the Interrupt Controller example. More... | |
int IntcInterruptSetup | ( | XIntc * | IntcInstancePtr, |
u16 | DeviceId | ||
) |
This function is used by the TestAppGen generated application to setup the interrupt controller.
IntcInstancePtr | is the reference to the Interrupt Controller instance. |
DeviceId | is device ID of the Interrupt Controller Device, typically XPAR_<INTC_instance>_DEVICE_ID value from xparameters.h. |
References XIN_REAL_MODE, XIntc_DeviceInterruptHandler(), XIntc_Initialize(), XIntc_SelfTest(), and XIntc_Start().
int IntcSelfTestExample | ( | u16 | DeviceId | ) |
This function runs a self-test on the driver/device.
This is a destructive test. This function is an example of how to use the interrupt controller driver component (XIntc) and the hardware device. This function is designed to work without any hardware devices to cause interrupts. It may not return if the interrupt controller is not properly connected to the processor in either software or hardware.
This function relies on the fact that the interrupt controller hardware has come out of the reset state such that it will allow interrupts to be simulated by the software.
DeviceId | is device ID of the Interrupt Controller Device, typically XPAR_<INTC_instance>_DEVICE_ID value from xparameters.h. |
References XIntc_Initialize(), and XIntc_SelfTest().
Referenced by main().
int main | ( | void | ) |
This is the main function for the Interrupt Controller example.
This function is not included if the example is generated from the TestAppGen test tool.
None. |
References IntcSelfTestExample().