xPCIe-3121 API
|
Functions | |
_INT_ | i_PCIe3121_InitAndStartTimer (HANDLE h_DeviceHandle, BYTE b_TimerNb, BYTE b_TimerMode, BYTE b_TimeBase, BYTE b_OutputMode, BYTE b_InterruptEnabled, WORD w_ReloadValue, BYTE b_WatchdogEnabled) |
_INT_ | i_PCIe3121_StopTimer (HANDLE h_DeviceHandle, BYTE b_TimerNb) |
_INT_ | i_PCIe3121_ReadTimerStatus (HANDLE h_DeviceHandle, BYTE b_TimerNb, PBYTE pb_TimerStatus, PBYTE pb_SoftwareTriggerStatus, PWORD pw_TimerValue) |
_INT_ | i_PCIe3121_ReadTimerValue (HANDLE h_DeviceHandle, BYTE b_TimerNb, PWORD pw_TimerValue) |
_INT_ | i_PCIe3121_TriggerTimer (HANDLE h_DeviceHandle, BYTE b_TimerNb) |
_INT_ i_PCIe3121_InitAndStartTimer | ( | HANDLE | h_DeviceHandle, |
BYTE | b_TimerNb, | ||
BYTE | b_TimerMode, | ||
BYTE | b_TimeBase, | ||
BYTE | b_OutputMode, | ||
BYTE | b_InterruptEnabled, | ||
WORD | w_ReloadValue, | ||
BYTE | b_WatchdogEnabled | ||
) |
Enables to start the timer.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_TimerNb | Specify the timer to be used. (0 or 1). |
[in] | b_TimerMode | Specify the mode of the timer. (PCIE3121_TIMER_MODE_2, PCIE3121_TIMER_MODE_3). |
[in] | b_TimeBase | Select the time base (PCIE3121_TIME_BASE_MICROSECONDS, PCIE3121_TIME_BASE_MILLISECONDS, PCIE3121_TIME_BASE_SECONDS) |
[in] | b_OutputMode | Set the way the output will change (PCIE3121_OUTPUT_ENABLED, PCIE3121_OUTPUT_DISABLED, PCIE3121_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) |
[in] | b_WatchdogEnabled | Specify if the watchdog is used (0,1). PCIE3121_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. PCIE3121_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_PCIe3121_StopTimer | ( | HANDLE | h_DeviceHandle, |
BYTE | b_TimerNb | ||
) |
Stops the timer
[in] | h_DeviceHandle | Handle of the board |
[in] | b_TimerNb | Specify the timer to be used. (0 or 1). |
_INT_ i_PCIe3121_ReadTimerStatus | ( | HANDLE | h_DeviceHandle, |
BYTE | b_TimerNb, | ||
PBYTE | pb_TimerStatus, | ||
PBYTE | pb_SoftwareTriggerStatus, | ||
PWORD | pw_TimerValue | ||
) |
Reads the timer status
[in] | h_DeviceHandle | Handle of the board |
[in] | b_TimerNb | Specify the timer to be used. (0 or 1). |
[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_PCIe3121_ReadTimerValue | ( | HANDLE | h_DeviceHandle, |
BYTE | b_TimerNb, | ||
PWORD | pw_TimerValue | ||
) |
Read the value of the timer
[in] | h_DeviceHandle | Handle of the board |
[in] | b_TimerNb | Specify the timer to be used. (0 or 1). |
[out] | pw_TimerValue | Current value of the ´timer |
_INT_ i_PCIe3121_TriggerTimer | ( | HANDLE | h_DeviceHandle, |
BYTE | b_TimerNb | ||
) |
Triggers the timer
[in] | h_DeviceHandle | Handle of the board |
[in] | b_TimerNb | Specify the timer to be used. (0 or 1). |