tmrctr
Xilinx SDK Drivers API Documentation
xtmrctr_selftest_example.c File Reference

Overview

This file contains a example for using the Timer Counter hardware and driver.

Note

None

MODIFICATION HISTORY:
Ver   Who  Date  Changes

1.00a sv 04/25/05 Initial release for TestApp integration. 2.00a ktn 11/26/09 Minor changes as per coding guidelines. 4.2 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 TmrCtrSelfTestExample (u16 DeviceId, u8 TmrCtrNumber)
 This function does a minimal test on the TmrCtr device and driver as a design example. More...
 
int main (void)
 Main function to call the example. More...
 

Function Documentation

◆ main()

int main ( void  )

Main function to call the example.

This function is not included if the example is generated from the TestAppGen test tool.

Parameters
None
Returns
XST_SUCCESS to indicate success, else XST_FAILURE to indicate a Failure.
Note
None

References TmrCtrSelfTestExample().

◆ TmrCtrSelfTestExample()

int TmrCtrSelfTestExample ( u16  DeviceId,
u8  TmrCtrNumber 
)

This function does a minimal test on the TmrCtr device and driver as a design example.

The purpose of this function is to illustrate how to use the XTmrCtr component.

Parameters
DeviceIdis the XPAR_<TMRCTR_instance>_DEVICE_ID value from xparameters.h
TmrCtrNumberis the timer counter of the device to operate on. Each device may contain multiple timer counters. The timer number is a zero based number with a range of 0 - (XTC_DEVICE_TIMER_COUNT - 1).
Returns
XST_SUCCESS if successful, XST_FAILURE if unsuccessful
Note
None

Referenced by main().