xPCI-3016 API
|
Functions | |
_INT_ | i_PCI3016_SetTTLPortConfiguration (HANDLE h_DeviceHandle, BYTE b_InOrOut) |
_INT_ | i_PCI3016_ReadTTLInputs (HANDLE h_DeviceHandle, BYTE b_Port, PWORD pw_Value) |
_INT_ | i_PCI3016_SetTTLOutputsOff (HANDLE h_DeviceHandle, BYTE b_Port, WORD w_Mask) |
_INT_ | i_PCI3016_SetTTLOutputsOn (HANDLE h_DeviceHandle, BYTE b_Port, WORD w_Mask) |
_INT_ | i_PCI3016_GetTTLOutputsStatus (HANDLE h_DeviceHandle, BYTE b_Port, PWORD pw_OutputsStatus) |
_INT_ i_PCI3016_SetTTLPortConfiguration | ( | HANDLE | h_DeviceHandle, |
BYTE | b_InOrOut | ||
) |
Set the TTL programmable port to input or output
[in] | h_DeviceHandle | Handle of the board |
[out] | b_InOrOut | Configure the programmable port as input (PCI3016_TTL_INPUT) or output (PCI3016_TTL_OUTPUT) |
0 | : No Error |
-1 | : The device handle parameter is wrong |
-2 | : Invalid port mode |
-3 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_PCI3016_ReadTTLInputs | ( | HANDLE | h_DeviceHandle, |
BYTE | b_Port, | ||
PWORD | pw_Value | ||
) |
Read the TTL inputs
In order to read the programmable port (with parameter PCI3016_PORT_PROGRAMMABLE or PCI3016_PORT_BOTH), it has to be set as an input first.
If PCI3016_PORT_INPUT or PCI3016_PORT_PROGRAMMABLE is used, the 8 lowest bits represent the port inputs.
If PCI3016_PORT_BOTH is used, then the 8 low bits represent the input port, and the 8 high bits the programmable port.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_Port | Port to read (PCI3016_PORT_INPUT, PCI3016_PORT_PROGRAMMABLE or PCI3016_PORT_BOTH) |
[out] | pw_Value | Value of the port. |
0 | : No Error |
-1 | : The device handle parameter is wrong |
-2 | : Invalid port selection |
-3 | : The programmable port is not configured as an input |
-4 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_PCI3016_SetTTLOutputsOff | ( | HANDLE | h_DeviceHandle, |
BYTE | b_Port, | ||
WORD | w_Mask | ||
) |
Set the TTL outputs to LOW
In order to set the programmable port (with parameter PCI3016_PORT_PROGRAMMABLE or PCI3016_PORT_BOTH), it has to be set as an output first.
If PCI3016_PORT_OUTPUT or PCI3016_PORT_PROGRAMMABLE is used, the 8 lowest bits represent the port outputs.
If PCI3016_PORT_BOTH is used, then the 8 low bits represent the output port, and the 8 high bits the programmable port.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_Port | Port to reset (PCI3016_PORT_OUTPUT, PCI3016_PORT_PROGRAMMABLE or PCI3016_PORT_BOTH) |
[in] | w_Mask | Outputs to reset (0x00 to 0xFF, or 0x0000 to 0xFFFF if both ports are used) |
0 | : No Error |
-1 | : The device handle parameter is wrong |
-2 | : Invalid port selection |
-3 | : The programmable port is not configured as an output |
-4 | : Invalid mask |
-5 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_PCI3016_SetTTLOutputsOn | ( | HANDLE | h_DeviceHandle, |
BYTE | b_Port, | ||
WORD | w_Mask | ||
) |
Set the TTL outputs to HIGH
In order to set the programmable port (with parameter PCI3016_PORT_PROGRAMMABLE or PCI3016_PORT_BOTH), it has to be set as an output first.
If PCI3016_PORT_OUTPUT or PCI3016_PORT_PROGRAMMABLE is used, the 8 lowest bits represent the port outputs.
If PCI3016_PORT_BOTH is used, then the 8 low bits represent the output port, and the 8 high bits the programmable port.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_Port | Port to reset (PCI3016_PORT_OUTPUT, PCI3016_PORT_PROGRAMMABLE or PCI3016_PORT_BOTH) |
[in] | w_Mask | Outputs to reset (0x00 to 0xFF, or 0x0000 to 0xFFFF if both ports are used) |
0 | : No Error |
-1 | : The device handle parameter is wrong |
-2 | : Invalid port selection |
-3 | : The programmable port is not configured as an output |
-4 | : Invalid mask |
-5 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_PCI3016_GetTTLOutputsStatus | ( | HANDLE | h_DeviceHandle, |
BYTE | b_Port, | ||
PWORD | pw_OutputsStatus | ||
) |
Get the TTL outputs status
In order to set the programmable port (with parameter PCI3016_PORT_PROGRAMMABLE or PCI3016_PORT_BOTH), it has to be set as an output first.
If PCI3016_PORT_OUTPUT or PCI3016_PORT_PROGRAMMABLE is used, the 8 lowest bits represent the port outputs.
If PCI3016_PORT_BOTH is used, then the 8 low bits represent the output port, and the 8 high bits the programmable port.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_Port | Port to reset (PCI3016_PORT_OUTPUT, PCI3016_PORT_PROGRAMMABLE or PCI3016_PORT_BOTH) |
[out] | pw_OutputsStatus | Outputs status (0x00 to 0xFF, or 0x0000 to 0xFFFF if both ports are used) |
0 | : No Error |
-1 | : The device handle parameter is wrong |
-2 | : Invalid port selection |
-3 | : The programmable port is not configured as an output |
-4 | : Invalid mask |
-5 | : Error while calling IOCTL function (wrong handle ?) |