xPCIe-3021 API
|
Functions | |
_INT_ | i_PCIe3021_InitAndStartTimer (HANDLE h_DeviceHandle, BYTE b_TimerMode, BYTE b_TimeBase, BYTE b_OutputMode, BYTE b_InterruptEnabled, WORD w_ReloadValue) |
_INT_ | i_PCIe3021_StopTimer (HANDLE h_DeviceHandle) |
_INT_ | i_PCIe3021_ReadTimerStatus (HANDLE h_DeviceHandle, PBYTE pb_TimerStatus, PBYTE pb_SoftwareTriggerStatus, PWORD pw_TimerValue) |
_INT_ | i_PCIe3021_ReadTimerValue (HANDLE h_DeviceHandle, PWORD pw_TimerValue) |
_INT_ | i_PCIe3021_TriggerTimer (HANDLE h_DeviceHandle) |
_INT_ i_PCIe3021_InitAndStartTimer | ( | HANDLE | h_DeviceHandle, |
BYTE | b_TimerMode, | ||
BYTE | b_TimeBase, | ||
BYTE | b_OutputMode, | ||
BYTE | b_InterruptEnabled, | ||
WORD | w_ReloadValue | ||
) |
Enables to start the timer.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_TimerMode | Specifiy the mode of the timer. (PCIE3021_TIMER_MODE_2, PCIE3021_TIMER_MODE_3). |
[in] | b_TimeBase | Select the time base (PCIE3021_TIME_BASE_MICROSECONDS, PCIE3021_TIME_BASE_MILLISECONDS, PCIE3021_TIME_BASE_SECONDS) |
[in] | b_OutputMode | Set the way the output will change (PCIE3021_OUTPUT_ENABLED, PCIE3021_OUTPUT_DISABLED, PCIE3021_OUTPUT_INVERTED) |
[in] | b_InterruptEnabled | Enable to use or not use an interrupt (0,1). |
[in] | w_ReloadValue | The time to count (depend on b_TimeBase) PCIE3021_TIMER_MODE_2: It functions like a divide-by-w_ReloadValue counter. It is used to generate a real time clock interrupt. OUT is initially high after the initialization. When the initial count has decremented to 1, OUT goes low for one CLK pulse. OUT then goes high again, the counter reloads the initial count (w_ReloadValue) and the process is repeated. This action can generate an interrupt. PCIE3021_TIMER_MODE_3: This mode is similar to mode 2 except for the duty cycle of OUT. OUT will initially be high after the initialisation. When the initial count (ul_ReloadValue) has expired, OUT goes low for the next sequence. When the initial count (ul_ReloadValue) of that sequence has expired, OUT goes high again for the following sequence. The mode is periodic; the sequence above is repeated indefinitely. |
_INT_ i_PCIe3021_StopTimer | ( | HANDLE | h_DeviceHandle | ) |
Stops the timer
[in] | h_DeviceHandle | Handle of the board |
_INT_ i_PCIe3021_ReadTimerStatus | ( | HANDLE | h_DeviceHandle, |
PBYTE | pb_TimerStatus, | ||
PBYTE | pb_SoftwareTriggerStatus, | ||
PWORD | pw_TimerValue | ||
) |
Reads the timer status
[in] | h_DeviceHandle | Handle of the board |
[out] | pb_TimerStatus | Timer status (0 = disabled, 1 = enabled) |
[out] | pb_SoftwareTriggerStatus | Status of the software trigger (0 = no software trigger occured, 1 = software trigger occured) |
[out] | pw_TimerValue | Current value of the timer |
_INT_ i_PCIe3021_ReadTimerValue | ( | HANDLE | h_DeviceHandle, |
PWORD | pw_TimerValue | ||
) |
Read the value of the timer
[in] | h_DeviceHandle | Handle of the board |
[out] | pw_TimerValue | Current value of the ´timer |
_INT_ i_PCIe3021_TriggerTimer | ( | HANDLE | h_DeviceHandle | ) |
Triggers the timer
[in] | h_DeviceHandle | Handle of the board |