# cbDConfigBit()

Configures a specific digital bit for input or output. This function treats all DIO ports on a board as a single port (AUXPORT); it is not supported by 8255 type DIO ports.

## Function Prototype

C/C++

int cbDConfigBit(int BoardNum, int PortType, int BitNum, int Direction)

Visual Basic

Function cbDConfigBit(ByVal BoardNum&, ByVal PortType&, ByVal BitNum&, ByVal Direction&) As Long

## Arguments

BoardNum

The number associated with the board when it was installed with InstaCal or created with cbCreateDaqDevice(). BoardNum may be 0 to 99.

PortType

The port (AUXPORT) whose bits are to be configured. The port specified must be bitwise configurable.

BitNum

The bit number to configure as input or output.

Direction

DIGITALOUT or DIGITALIN configures the specified bit for output or input, respectively.

## Returns

- Error code or 0 if no errors