we_ConfigureCard 

long we_ConfigureCard(
     long Handle,   //handle returned by we_OpenCard
     long Port,   //identifies the port to configure
     long Mode   //specifies how to configure the port
     );

Summary

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:

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.

Related

we_OpenCard


Copyright 2004 Winford Engineering.