![]() |
hwicap
Xilinx SDK Drivers API Documentation
|
This file contains a design example using the HwIcap driver (XHwIcap) and the HwIcap device using the interrupt mode.
*****WARNING ************
This is not an example that can be used directly. This example gives the sequence of steps that need to be done for programming the FPGA with a given configuration(partial) file. This configuration file differs from each system and each version of the FPGA device.
MODIFICATION HISTORY:
Ver Who Date Changes
2.00a sv 09/29/07 First release 4.00a hvm 12/1/09 Updated with HAL phase 1 changes 5.00a hvm 2/25/10 Updated with S6 support 10.0 bss 6/24/14 Removed support for families older than 7 series 11.0 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. 11.2 Nava 30/01/19 Replaced #error with #pragma message since the information related to #error is not an error info. It provides an information about the example behaviour. *
Functions | |
int | HwIcapIntrExample (XIntc *IntcInstancePtr, XHwIcap *HwIcapInstancePtr, u16 HwIcapDeviceId, u16 HwIcapIntrId) |
This function does a minimal test on the HwIcap device and driver as a design example. More... | |
void | HwIcapIntrHandler (void *CallBackRef, u32 StatusEvent, u32 ByteCount) |
This function is the handler which performs processing for the HwIcap driver. More... | |
int | main (void) |
Main function to call the HwIcap interrupt example. More... | |
int HwIcapIntrExample | ( | XIntc * | IntcInstancePtr, |
XHwIcap * | HwIcapInstancePtr, | ||
u16 | HwIcapDeviceId, | ||
u16 | HwIcapIntrId | ||
) |
This function does a minimal test on the HwIcap device and driver as a design example.
The purpose of this function is to illustrate how to use the XHwIcap component using the interrupt mode.
This function sends data and expects to receive the same data.
IntcInstancePtr | is a pointer to the instance of the INTC component. |
HwIcapInstancePtr | is a pointer to the instance of HwIcap component. |
HwIcapDeviceId | is the Device ID of the HwIcap Device and is the XPAR_<HWICAP_instance>_DEVICE_ID value from xparameters.h. |
HwIcapIntrId | is the interrupt Id and is typically XPAR_<INTC_instance>_<HWICAP_instance>_IP2INTC_IRPT_INTR value from xparameters.h . |
This function contains an infinite loop such that if interrupts are not working it may never return.
References XHwIcap_Config::BaseAddress, HwIcapIntrHandler(), XHI_IPIXR_WRP_MASK, XHwIcap_CfgInitialize(), XHwIcap_DeviceWrite(), XHwIcap_IntrEnable, XHwIcap_LookupConfig(), XHwIcap_SelfTest(), XHwIcap_SetInterruptHandler(), and XHwIcap_Type1Read.
Referenced by main().
void HwIcapIntrHandler | ( | void * | CallBackRef, |
u32 | StatusEvent, | ||
u32 | ByteCount | ||
) |
This function is the handler which performs processing for the HwIcap driver.
It is called from an interrupt context such that the amount of processing performed should be minimized. It is called when a transfer of HwIcap data completes or an error occurs.
This handler provides an example of how to handle HwIcap interrupts and is application specific.
CallBackRef | is the upper layer callback reference passed back when the callback function is invoked. |
StatusEvent | is the event that just occurred. |
WordCount | is the number of words (32 bit) transferred up until the event occurred. |
Referenced by HwIcapIntrExample().
int main | ( | void | ) |
Main function to call the HwIcap interrupt example.
None |
References HwIcapIntrExample().