Software Drivers
Main Page | Data Structures | File List | Data Fields | Globals

xtmrctr_selftest.c File Reference


Detailed Description

Contains diagnostic/self-test functions for the XTmrCtr component.

 MODIFICATION HISTORY:

 Ver   Who  Date     Changes
 ----- ---- -------- -----------------------------------------------
 1.00b jhl  02/06/02 First release
 1.10b mta  03/21/07 Updated to new coding style
 


Functions

int XTmrCtr_SelfTest (XTmrCtr *InstancePtr, u8 TmrCtrNumber)


Function Documentation

int XTmrCtr_SelfTest XTmrCtr InstancePtr,
u8  TmrCtrNumber
 

Runs a self-test on the driver/device. This test verifies that the specified timer counter of the device can be enabled and increments.

Parameters:
InstancePtr is a pointer to the XTmrCtr instance.
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).
Returns:
  • XST_SUCCESS if self-test was successful
  • XST_FAILURE if the timer is not incrementing.
Note:
This is a destructive test using the provided timer. The current settings of the timer are returned to the initialized values and all settings at the time this function is called are overwritten.