xPCI-1500 API
|
Functions | |
_INT_ | i_APCI1500_InitWatchdogCounter3 (BYTE_ b_BoardHandle, BYTE_ b_ComponentMode, LONG_ w_ReloadValue, BYTE_ b_EnableContinuousCycle, BYTE_ b_EnableHardwareGate, BYTE_ b_EnableInterrupt) |
_INT_ | i_APCI1500_StartCounter3 (BYTE_ b_BoardHandle) |
_INT_ | i_APCI1500_StopCounter3 (BYTE_ b_BoardHandle) |
_INT_ | i_APCI1500_TriggerCounter3 (BYTE_ b_BoardHandle) |
_INT_ | i_APCI1500_TriggerWatchdog (BYTE_ b_BoardHandle) |
_INT_ | i_APCI1500_ReadCounter3 (BYTE_ b_BoardHandle, PLONG_ pl_ReadValue) |
_INT_ i_APCI1500_InitWatchdogCounter3 | ( | BYTE_ | b_BoardHandle, |
BYTE_ | b_ComponentMode, | ||
LONG_ | w_ReloadValue, | ||
BYTE_ | b_EnableContinuousCycle, | ||
BYTE_ | b_EnableHardwareGate, | ||
BYTE_ | b_EnableInterrupt | ||
) |
Initializes and start the component 3 as a watchdog or a counter.
Important! The timer component internally operates with half of the input frequency.
If the timer 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 timer/counter supports hardware gate, i.e. the watchdog/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] | b_BoardHandle | 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 timer |
[in] | b_EnableContinuousCycle | Reset the timer to us_ReloadValue after each interrupt, and continue counting (0,1) |
[in] | b_EnableHardwareGate | Enable the hardware gate on pin 12 (0,1) |
[in] | b_EnableInterrupt | An interrupt is generated each time the timer or counter expires (0,1) |
0 | : No Error |
-1 | : The handle parameter of the board is wrong |
-2 | : Parameter for selecting the counter/watchdog wrong |
-103 | : Error while calling IOCTL function (wrong handle ?) |
-202 | : The component is not initialized |
-203 | : The component is still started, stop it before trying to restart it |
_INT_ i_APCI1500_StartCounter3 | ( | BYTE_ | b_BoardHandle | ) |
Starts the watchdog counter 3 as a watchdog or a counter (depending on how you initialized it)
[in] | b_BoardHandle | Handle of the board |
0 | : No Error |
-1 | : The handle parameter of the board is wrong |
-2 | : The component is not initialized |
-102 | : The component is still started, stop it before trying to restart it |
-104 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_APCI1500_StopCounter3 | ( | BYTE_ | b_BoardHandle | ) |
Stops the watchdog counter 3
[in] | b_BoardHandle | Handle of the board |
0 | : No Error |
-1 | : The handle parameter of the board is wrong |
-102 | : Nothing is started on the component (so nothing to stop) |
-103 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_APCI1500_TriggerCounter3 | ( | BYTE_ | b_BoardHandle | ) |
Triggers the watchdog counter 3, resetting its value
[in] | b_BoardHandle | Handle of the board |
0 | : No Error |
-1 | : The handle parameter of the board is wrong |
-102 | : Nothing is started on the component (so nothing to trigger) |
-103 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_APCI1500_TriggerWatchdog | ( | BYTE_ | b_BoardHandle | ) |
Triggers the watchdog counter 3, resetting its value
[in] | b_BoardHandle | Handle of the board |
0 | : No Error |
-1 | : The handle parameter of the board is wrong |
-102 | : Nothing is started on the component (so nothing to trigger) |
-103 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_APCI1500_ReadCounter3 | ( | BYTE_ | b_BoardHandle, |
PLONG_ | pl_ReadValue | ||
) |
Reads the watchdog counter 3 current value
[in] | b_BoardHandle | Handle of the board |
[out] | pl_ReadValue | Current value of the watchdog counter |
0 | : No Error |
-1 | : The handle parameter of the board is wrong |
-102 | : Nothing is started on the component (so nothing to read) |
-103 | : Error while calling IOCTL function (wrong handle ?) |