tmrctr: xtmrctr.h File Reference

| tmrctr Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Data Structures | Typedefs | Functions
xtmrctr.h File Reference

## Data Structures
struct | XTmrCtr_Config
| This typedef contains configuration information for the device. More...
struct | XTmrCtrStats
| Timer/Counter statistics. More...
struct | XTmrCtr
| The XTmrCtr driver instance data. More...

## Macros
Configuration options
These options are used in XTmrCtr_SetOptions() and XTmrCtr_GetOptions()
#define | XTC_CASCADE_MODE_OPTION 0x00000080UL
| Used to configure the timer counter device. More...
#define | XTC_ENABLE_ALL_OPTION 0x00000040UL
#define | XTC_DOWN_COUNT_OPTION 0x00000020UL
#define | XTC_CAPTURE_MODE_OPTION 0x00000010UL
#define | XTC_INT_MODE_OPTION 0x00000008UL
#define | XTC_AUTO_RELOAD_OPTION 0x00000004UL
#define | XTC_EXT_COMPARE_OPTION 0x00000002UL

## Typedefs
typedef void(* | XTmrCtr_Handler )(void *CallBackRef, u8 TmrCtrNumber)
| Signature for the callback function. More...

## Functions
void | XTmrCtr_CfgInitialize (XTmrCtr *InstancePtr, XTmrCtr_Config *ConfigPtr, UINTPTR EffectiveAddr)
| This function populates the timer counter's configuration structure and sets some configurations defaults. More...
int | XTmrCtr_InitHw (XTmrCtr *InstancePtr)
| (Re-)initialzes all timer counters which aren't started already. More...
int | XTmrCtr_Initialize (XTmrCtr *InstancePtr, u16 DeviceId)
| Initializes a specific timer/counter instance/driver. More...
void | XTmrCtr_Start (XTmrCtr *InstancePtr, u8 TmrCtrNumber)
| Starts the specified timer counter of the device such that it starts running. More...
void | XTmrCtr_Stop (XTmrCtr *InstancePtr, u8 TmrCtrNumber)
| Stops the timer counter by disabling it. More...
u32 | XTmrCtr_GetValue (XTmrCtr *InstancePtr, u8 TmrCtrNumber)
| Get the current value of the specified timer counter. More...
void | XTmrCtr_SetResetValue (XTmrCtr *InstancePtr, u8 TmrCtrNumber, u32 ResetValue)
| Set the reset value for the specified timer counter. More...
u32 | XTmrCtr_GetCaptureValue (XTmrCtr *InstancePtr, u8 TmrCtrNumber)
| Returns the timer counter value that was captured the last time the external capture input was asserted. More...
int | XTmrCtr_IsExpired (XTmrCtr *InstancePtr, u8 TmrCtrNumber)
| Checks if the specified timer counter of the device has expired. More...
void | XTmrCtr_Reset (XTmrCtr *InstancePtr, u8 TmrCtrNumber)
| Resets the specified timer counter of the device. More...
u8 | XTmrCtr_PwmConfigure (XTmrCtr *InstancePtr, u32 PwmPeriod, u32 PwmHighTime)
| Configures timers to generate PWM output. More...
void | XTmrCtr_PwmEnable (XTmrCtr *InstancePtr)
| Enables the PWM output as per configurations set by XTmrCtr_PwmConfigure. More...
void | XTmrCtr_PwmDisable (XTmrCtr *InstancePtr)
| Disables the PWM output. More...
XTmrCtr_Config * | XTmrCtr_LookupConfig (u16 DeviceId)
| Looks up the device configuration based on the unique device ID. More...
void | XTmrCtr_SetOptions (XTmrCtr *InstancePtr, u8 TmrCtrNumber, u32 Options)
| Enables the specified options for the specified timer counter. More...
u32 | XTmrCtr_GetOptions (XTmrCtr *InstancePtr, u8 TmrCtrNumber)
| Get the options for the specified timer counter. More...
void | XTmrCtr_GetStats (XTmrCtr *InstancePtr, XTmrCtrStats *StatsPtr)
| Get a copy of the XTmrCtrStats structure, which contains the current statistics for this driver. More...
void | XTmrCtr_ClearStats (XTmrCtr *InstancePtr)
| Clear the XTmrCtrStats structure for this driver. More...
int | XTmrCtr_SelfTest (XTmrCtr *InstancePtr, u8 TmrCtrNumber)
| Runs a self-test on the driver/device. More...
void | XTmrCtr_SetHandler (XTmrCtr *InstancePtr, XTmrCtr_Handler FuncPtr, void *CallBackRef)
| Sets the timer callback function, which the driver calls when the specified timer times out. More...
void | XTmrCtr_InterruptHandler (void *InstancePtr)
| Interrupt Service Routine (ISR) for the driver. More...