The we_ConfigureCard function is used to configure the ports on an I/O
card as inputs or outputs.
Parameters
Handle:
Identifies the card to be configured. This handle must have been returned
from we_OpenCard.
Port:
Identifies the port on the card that should be configured. The values
for this parameter depend on which card model is being used.
Mode:
Specifies which mode the port should be put into (often WECRD_INPUT
or WECRD_OUTPUT). See the programming guide
for your card to see what modes are available.
Return Values
If the card was successfully configured, the function will return 0 to
indicate success. If an error occurs, a negative error code will be returned.
Errors that may be returned include:
WECRD_INVALID_HANDLE - You passed an invalid handle. Use we_OpenCard
to obtain a handle before calling this function.
WECRD_INVALID_PORT - The card you are using does not have that port.
WECRD_INVALID_PORTMODE - The port you specified cannot be put into the
mode you specified. Mode doesn't exist or it is currently unavailable.
More Information
When using the CRD155B I/O card, calling we_ConfigureCard to configure any
of the I/O ports has the side-effect of clearing the other ports' output values to
zero, due to the 8255 architecture of the card. Please see the
CRD155B programming guide for further information.