xPCI-3120 API
|
Functions | |
_INT_ | i_APCI3120_InitTimerWatchdog (BYTE_ b_BoardHandle, BYTE_ b_TimerMode, LONG_ l_DelayValue, BYTE_ b_InterruptFlag) |
_INT_ | i_APCI3120_StartTimerWatchdog (BYTE_ b_BoardHandle) |
_INT_ | i_APCI3120_StopTimerWatchdog (BYTE_ b_BoardHandle) |
_INT_ | i_APCI3120_ReadTimer (BYTE_ b_BoardHandle, PLONG_ pl_ReadValue) |
_INT_ | i_APCI3120_WriteTimer (BYTE_ b_BoardHandle, LONG_ l_WriteValue) |
_INT_ | i_APCI3120_ReadWatchdogStatus (BYTE_ b_BoardHandle, PBYTE pb_WatchdogStatus) |
_INT_ i_APCI3120_InitTimerWatchdog | ( | BYTE_ | b_BoardHandle, |
BYTE_ | b_TimerMode, | ||
LONG_ | l_DelayValue, | ||
BYTE_ | b_InterruptFlag | ||
) |
Initializes the timer as an edge generator or watchdog
[in] | b_BoardHandle | Handle of the board |
[in] | b_TimerMode | Selects the component mode ( PCI3120_WATCHDOG or PCI3120_COUNTER ) |
[in] | l_DelayValue | Defines the starting value of the timer |
[in] | b_InterruptFlag | Reset the timer to us_ReloadValue after each interrupt, and continue counting (0,1) |
0 | : No Error |
-1 | : The handle parameter of the board is wrong |
-2 | : Timer mode error |
-3 | : The user interrupt routine is not installed, see function i_APCI3120_SetBoardIntRoutine |
-4 | : The interrupt parameter is wrong |
-5 | : The time interval selected for timer is wrong |
_INT_ i_APCI3120_StartTimerWatchdog | ( | BYTE_ | b_BoardHandle | ) |
Start timer/watchdog
[in] | b_BoardHandle | Handle of the board |
0 | : No error |
-101 | : The device handle parameter is wrong |
-102 | : The timer is already running |
-103 | : b_TimerMode is invalid |
-104 | : Timer mode choosen. dw_DelayValue is too low |
-105 | : Timer mode choosen. dw_DelayValue is too high |
-106 | : Watchdog mode choosen. dw_DelayValue is too low |
-107 | : Watchdog mode choosen. dw_DelayValue is too high |
-108 | : dw_DelayValue must be a multiple of 50 |
-109 | : b_InterruptFlag is APCI3120_ENABLE but no interrupt handler is installed. Please call i_PCI3120_SetBoardIntRoutine before calling this function |
-110 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_APCI3120_StopTimerWatchdog | ( | BYTE_ | b_BoardHandle | ) |
Stops timer/watchdog
[in] | b_BoardHandle | Handle of the board |
0 | : No Error |
-1 | : The handle parameter of the board is wrong |
-3 | : Timer/watchdog has not been started |
-103 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_APCI3120_ReadTimer | ( | BYTE_ | b_BoardHandle, |
PLONG_ | pl_ReadValue | ||
) |
Reads the current value of timer 2
[in] | b_BoardHandle | Handle of the board |
[out] | pl_ReadValue | Current timer value |
0 | : No Error |
-1 | : The handle parameter of the board is wrong |
-102 | : The timer / watchdog is not running as a timer at the moment |
-103 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_APCI3120_WriteTimer | ( | BYTE_ | b_BoardHandle, |
LONG_ | l_WriteValue | ||
) |
Writes a new value in the timer
[in] | b_BoardHandle | Handle of the board |
[out] | l_WriteValue | New timer value |
0 | : No Error |
-1 | : The handle parameter of the board is wrong |
-102 | : The timer / watchdog is not running as a timer at the moment |
-103 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_APCI3120_ReadWatchdogStatus | ( | BYTE_ | b_BoardHandle, |
PBYTE | pb_WatchdogStatus | ||
) |
Read watchdog status
[in] | b_BoardHandle | : Handle of the board |
[out] | pb_WatchdogStatus | : Watchdog status, 0 -> Watchdog has not run down, 1 -> Watchdog has run down |
0 | : No Error |
-1 | : The handle parameter of the board is wrong |
-102 | : The timer / watchdog is not running as a watchdog at the moment , |
-103 | : Error while calling IOCTL function (wrong handle ?) |