Data Structures | |
struct | XTmrCtr_Config |
struct | XTmrCtrStats |
struct | XTmrCtr |
Configuration options | |
These options are used in XTmrCtr_SetOptions() and XTmrCtr_GetOptions() | |
#define | XTC_ENABLE_ALL_OPTION |
#define | XTC_DOWN_COUNT_OPTION |
#define | XTC_CAPTURE_MODE_OPTION |
#define | XTC_INT_MODE_OPTION |
#define | XTC_AUTO_RELOAD_OPTION |
#define | XTC_EXT_COMPARE_OPTION |
Typedefs | |
typedef void(* | XTmrCtr_Handler )(void *CallBackRef, u8 TmrCtrNumber) |
Functions | |
int | XTmrCtr_Initialize (XTmrCtr *InstancePtr, u16 DeviceId) |
void | XTmrCtr_Start (XTmrCtr *InstancePtr, u8 TmrCtrNumber) |
void | XTmrCtr_Stop (XTmrCtr *InstancePtr, u8 TmrCtrNumber) |
u32 | XTmrCtr_GetValue (XTmrCtr *InstancePtr, u8 TmrCtrNumber) |
void | XTmrCtr_SetResetValue (XTmrCtr *InstancePtr, u8 TmrCtrNumber, u32 ResetValue) |
u32 | XTmrCtr_GetCaptureValue (XTmrCtr *InstancePtr, u8 TmrCtrNumber) |
int | XTmrCtr_IsExpired (XTmrCtr *InstancePtr, u8 TmrCtrNumber) |
void | XTmrCtr_Reset (XTmrCtr *InstancePtr, u8 TmrCtrNumber) |
void | XTmrCtr_SetOptions (XTmrCtr *InstancePtr, u8 TmrCtrNumber, u32 Options) |
u32 | XTmrCtr_GetOptions (XTmrCtr *InstancePtr, u8 TmrCtrNumber) |
void | XTmrCtr_GetStats (XTmrCtr *InstancePtr, XTmrCtrStats *StatsPtr) |
void | XTmrCtr_ClearStats (XTmrCtr *InstancePtr) |
int | XTmrCtr_SelfTest (XTmrCtr *InstancePtr, u8 TmrCtrNumber) |
void | XTmrCtr_SetHandler (XTmrCtr *InstancePtr, XTmrCtr_Handler FuncPtr, void *CallBackRef) |
void | XTmrCtr_InterruptHandler (void *InstancePtr) |
|
Used to configure the timer counter device. XTC_ENABLE_ALL_OPTION Enables all timer counters at once. XTC_DOWN_COUNT_OPTION Configures the timer counter to count down from start value, the default is to count up. XTC_CAPTURE_MODE_OPTION Configures the timer to capture the timer counter value when the external capture line is asserted. The default mode is compare mode. XTC_INT_MODE_OPTION Enables the timer counter interrupt output. XTC_AUTO_RELOAD_OPTION In compare mode, configures the timer counter to reload from the compare value. The default mode causes the timer counter to hold when the compare value is hit. In capture mode, configures the timer counter to not hold the previous capture value if a new event occurs. The default mode cause the timer counter to hold the capture value until recognized. XTC_EXT_COMPARE_OPTION Enables the external compare output signal. |
|
Signature for the callback function.
|
|
Clear the XTmrCtrStats structure for this driver.
|
|
Returns the timer counter value that was captured the last time the external capture input was asserted.
|
|
Get the options for the specified timer counter.
|
|
Get a copy of the XTmrCtrStats structure, which contains the current statistics for this driver.
|
|
Get the current value of the specified timer counter. The timer counter may be either incrementing or decrementing based upon the current mode of operation.
|
|
Initializes a specific timer/counter instance/driver. Initialize fields of the XTmrCtr structure, then reset the timer/counter
|
|
Interrupt Service Routine (ISR) for the driver. This function only performs processing for the device and does not save and restore the interrupt context.
|
|
Checks if the specified timer counter of the device has expired. In capture mode, expired is defined as a capture occurred. In compare mode, expired is defined as the timer counter rolled over/under for up/down counting. When interrupts are enabled, the expiration causes an interrupt. This function is typically used to poll a timer counter to determine when it has expired.
|
|
Resets the specified timer counter of the device. A reset causes the timer counter to set it's value to the reset value.
|
|
Runs a self-test on the driver/device. This test verifies that the specified timer counter of the device can be enabled and increments.
|
|
Sets the timer callback function, which the driver calls when the specified timer times out.
|
|
Enables the specified options for the specified timer counter. This function sets the options without regard to the current options of the driver. To prevent a loss of the current options, the user should call XTmrCtr_GetOptions() prior to this function and modify the retrieved options to pass into this function to prevent loss of the current options.
|
|
Set the reset value for the specified timer counter. This is the value that is loaded into the timer counter when it is reset. This value is also loaded when the timer counter is started.
|
|
Starts the specified timer counter of the device such that it starts running. The timer counter is reset before it is started and the reset value is loaded into the timer counter. If interrupt mode is specified in the options, it is necessary for the caller to connect the interrupt handler of the timer/counter to the interrupt source, typically an interrupt controller, and enable the interrupt within the interrupt controller.
|
|
Stops the timer counter by disabling it. It is the callers' responsibility to disconnect the interrupt handler of the timer_counter from the interrupt source, typically an interrupt controller, and disable the interrupt within the interrupt controller.
|
Copyright © 1995-2009 Xilinx, Inc. All rights reserved.