DioGetIOPinsStaticDirection

Applies To

GX5055, GX5295

Purpose

Returns the I/O pins channels direction when in static mode.

Syntax

DioGetIOPinsStaticDirection (nHandle, pdwDirection, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Board handle.
pdwDirection
PDWORD
The 32 I/O channels directions are represented by the 32-bits. Each bit represents a channel starting from 0, e.g. channel zero is represented by bit 0.
A bit high means the channel is set to output while a bit low means channel is set to input.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Example

The following example returns the I/O pins channels direction when in static mode:

 

SHORT nStatus;

DWORD dwDirection;

DioGetIOPinsStaticDirection (nHandle, &dwDirection, &nStatus);

 

See Also

DioSetupIOPinsStaticDirection, DioReadIoPinsValidity, DioReadIOPinsValue, DioWriteIOPinsValue, DioGetErrorString