xPCIe1032 API
xPCIe1032 Timer functions

Functions

_INT_ i_PCIe1032_InitAndStartTimer (IN HANDLE h_DeviceHandle, IN BYTE b_TimeBase, IN WORD w_ReloadValue, IN BYTE b_InterruptFlag)
 
_INT_ i_PCIe1032_ReadTimerValue (IN HANDLE h_DeviceHandle, OUT WORD *w_Value)
 
_INT_ i_PCIe1032_ReadTimerStatus (IN HANDLE h_DeviceHandle, OUT BYTE *b_TimerStatus, OUT BYTE *b_SoftwareTriggerStatus, OUT WORD *w_TimerValue)
 
_INT_ i_PCIe1032_StopAndReleaseTimer (IN HANDLE h_DeviceHandle)
 
_INT_ i_PCIe1032_TriggerTimer (IN HANDLE h_DeviceHandle)
 

Detailed Description

Function Documentation

_INT_ i_PCIe1032_InitAndStartTimer ( IN HANDLE  h_DeviceHandle,
IN BYTE  b_TimeBase,
IN WORD  w_ReloadValue,
IN BYTE  b_InterruptFlag 
)

Initializes and starts timer 0 of the board

Parameters
[in]h_DeviceHandleHandle of the board
[in]b_TimeBaseTime base of the timer (0 -> microseconds, 1 -> milliseconds, 2 -> seconds) (0..2)
[in]w_ReloadValueTimer reload value (1..0xFFF)
[in]b_InterruptFlagInterrupt flag (0..1)
Return values
0No error
-1The h_DeviceHandle parameter is wrong
-2The b_TimeBase parameter is wrong
-3The w_ReloadValue parameter is wrong
-4The b_InterruptFlag parameter is wrong
_INT_ i_PCIe1032_ReadTimerValue ( IN HANDLE  h_DeviceHandle,
OUT WORD *  w_Value 
)

Reads the value of the timer 0

Parameters
[in]h_DeviceHandleHandle of the board
[out]w_ValueCurrent value of the timer
Return values
0No error
-1The h_DeviceHandle parameter is wrong
-100An error occurred while calling the IOCTL function
_INT_ i_PCIe1032_ReadTimerStatus ( IN HANDLE  h_DeviceHandle,
OUT BYTE *  b_TimerStatus,
OUT BYTE *  b_SoftwareTriggerStatus,
OUT WORD *  w_TimerValue 
)

Reads the status of timer 0

Parameters
[in]h_DeviceHandleHandle of the board
[out]b_SoftwareTriggerStatusCurrent software trigger status (0 -> No trigger occurred, 1 -> A trigger occurred)
[out]w_TimerValueCurrent value of the timer
Return values
0No error
-1The h_DeviceHandle parameter is wrong
_INT_ i_PCIe1032_StopAndReleaseTimer ( IN HANDLE  h_DeviceHandle)

Stops and releases the timer 0 of the board

Parameters
[in]h_DeviceHandleHandle of the board
Return values
0No error
-1The h_DeviceHandle parameter is wrong
-100An error occurred while calling the IOCTL function
_INT_ i_PCIe1032_TriggerTimer ( IN HANDLE  h_DeviceHandle)

Triggers the timer 0 of the board

Parameters
[in]h_DeviceHandleHandle of the board
Return values
0No error
-1The h_DeviceHandle parameter is wrong
-100An error occurred while calling the IOCTL function