cfa
Xilinx SDK Drivers API Documentation
cfa_selftest_example.c File Reference

Overview

This file contains an example using the XCfa driver to do self test on the device.

Note

None

MODIFICATION HISTORY:

Ver     Who     Date    Changes


1.00a drg/jz 01/13/10 First Release 1.03a sg 08/14/12 Updated the example for CR 666306. Modified the device ID to use the first Device Id Removed the printf at the start of the main 7.0 adk 01/15/14 Implimented main and XCfaSelfTestExample functions. Adherence to MISRA C 2012 standard guidelines. 7.1 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.

Macros

#define CFA_DEVICE_ID   XPAR_CFA_0_DEVICE_ID
 CFA Device ID. More...
 

Functions

u32 XCfaSelfTestExample (u16 DeviceId)
 This function does a minimal test on the XCfa driver. More...
 
int main (void)
 Main function to call the example. More...
 

Variables

XCfa Cfa
 Instance of the CFA Device. More...
 

Macro Definition Documentation

#define CFA_DEVICE_ID   XPAR_CFA_0_DEVICE_ID

CFA Device ID.

Referenced by main().

Function Documentation

int main ( void  )

Main function to call the example.

Returns
XST_SUCCESS if succesful, otherwise XST_FAILURE.
Note
None.

References CFA_DEVICE_ID, and XCfaSelfTestExample().

u32 XCfaSelfTestExample ( u16  DeviceId)

This function does a minimal test on the XCfa driver.

Parameters
DeviceIdis the XPAR_<CFA_instance>_DEVICE_ID value from xparameters.h.
Returns
XST_SUCCESS if succesful, otherwise XST_FAILURE.
Note
None.

< Default value of the Control registers Status Register and Error Register

References XCfa_Config::BaseAddress, XCfa_CfgInitialize(), XCFA_CONTROL_OFFSET, XCFA_ERROR_OFFSET, XCfa_LookupConfig(), XCfa_ReadReg, XCfa_SelfTest(), and XCFA_STATUS_OFFSET.

Referenced by main().

Variable Documentation

XCfa Cfa

Instance of the CFA Device.