![]() |
tmrctr
Vitis Drivers API Documentation
|
This file contains a design example using the Timer Counter driver (XTmrCtr) and hardware device in a polled mode.
None.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00b jhl 02/13/02 First release 1.00b sv 04/26/05 Minor changes to comply to Doxygen and coding guidelines. 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 | TmrCtrPolledExample (u16 DeviceId, u8 TmrCtrNumber) |
This function does a minimal test on the timer counter device and driver as a design example. More... | |
int | main (void) |
Main function to call the polled example. More... | |
int main | ( | void | ) |
Main function to call the polled example.
None. |
References TmrCtrPolledExample().
int TmrCtrPolledExample | ( | u16 | DeviceId, |
u8 | TmrCtrNumber | ||
) |
This function does a minimal test on the timer counter device and driver as a design example.
The purpose of this function is to illustrate how to use the XTmrCtr component in a polled mode.
DeviceId | is the XPAR_<TMRCTR_instance>_DEVICE_ID value from xparameters.h |
TmrCtrNumber | is 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). |
This function contains a loop which waits for the value of a timer counter to change. If the hardware is not working correctly, this function may not return.
References XTmrCtr_GetValue(), XTmrCtr_Initialize(), XTmrCtr_SelfTest(), XTmrCtr_SetOptions(), and XTmrCtr_Start().
Referenced by main().