xPCI-1500 API
|
Functions | |
_INT_ | i_PCI1500_InitWatchdogCounter3 (HANDLE h_DeviceHandle, BYTE b_ComponentMode, WORD w_ReloadValue, BYTE b_EnableContinuousCycle, BYTE b_EnableHardwareGate, BYTE b_EnableInterrupt) |
_INT_ | i_PCI1500_StartWatchdogCounter3 (HANDLE h_DeviceHandle) |
_INT_ | i_PCI1500_StopWatchdogCounter3 (HANDLE h_DeviceHandle) |
_INT_ | i_PCI1500_TriggerWatchdogCounter3 (HANDLE h_DeviceHandle) |
_INT_ | i_PCI1500_ReadWatchdogCounter3 (HANDLE h_DeviceHandle, PWORD pw_TimerValue) |
_INT_ i_PCI1500_InitWatchdogCounter3 | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ComponentMode, | ||
WORD | w_ReloadValue, | ||
BYTE | b_EnableContinuousCycle, | ||
BYTE | b_EnableHardwareGate, | ||
BYTE | b_EnableInterrupt | ||
) |
Initializes the component 3 as a watchdog or a counter.
Important! The WatchdogCounter component internally operates with half of the input frequency.
If the WatchdogCounter is set as a watchdog, the time period is defined by (2*w_ReloadValue)/InputClock, where InputClock is the value of the input clock in Hz.
This WatchdogCounter, when configured as a counter supports hardware gate. When hardware gate is enabled, then the counter is only counting if the gate input is high.
If the counter is used, input 15 acts as the counter input
If the hardware gate is enabled, input 16 acts as the gate input
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ComponentMode | Selects the component mode ( PCI1500_WATCHDOG or PCI1500_COUNTER ) |
[in] | w_ReloadValue | Defines the starting value of the WatchdogCounter |
[in] | b_EnableContinuousCycle | Reset the WatchdogCounter to us_ReloadValue after each interrupt, and continue counting (0 disable, 1 enable) |
[in] | b_EnableHardwareGate | Enable the hardware gate on pin 27 input 16 (0 disable, 1 enable) |
[in] | b_EnableInterrupt | An interrupt is generated each time the watchdog or the counter expires (0 disable, 1 enable) |
_INT_ i_PCI1500_StartWatchdogCounter3 | ( | HANDLE | h_DeviceHandle | ) |
Starts the watchdog counter 3 as a watchdog or a counter (depending on how you initialized it)
[in] | h_DeviceHandle | Handle of the board |
_INT_ i_PCI1500_StopWatchdogCounter3 | ( | HANDLE | h_DeviceHandle | ) |
Stops the watchdog counter 3
[in] | h_DeviceHandle | Handle of the board |
_INT_ i_PCI1500_TriggerWatchdogCounter3 | ( | HANDLE | h_DeviceHandle | ) |
Triggers the watchdog counter 3, resetting its value
[in] | h_DeviceHandle | Handle of the board |
_INT_ i_PCI1500_ReadWatchdogCounter3 | ( | HANDLE | h_DeviceHandle, |
PWORD | pw_TimerValue | ||
) |
Reads the watchdog counter 3 current value
[in] | h_DeviceHandle | Handle of the board |
[out] | pw_TimerValue | Current value of the watchdog counter |