User Manual

Programmer's reference33
Copyright © 2005-2010 Pico Technology Ltd. All rights reserved.adc20.en
5.4.16
HRDLSetDigitalIOChannel (ADC-24 only)
short HRDLSetDigitalIOChannel(
short handle,
short directionOut,
short digitalOutPinState,
short enabledDigitalIn )
Sets up the digital input/output channels. If the direction is 'output' then the pin can
be set high (on) or low (off). While the device is sampling, the direction cannot be
changed but the value of an output can.
Arguments
handle
Handle returned by HRDLOpenUnit.
directionOut
The directions of the digital IO pins, either input or output. The
four least significant bits must be a combination of
HRDL_DIGITAL_IO_CHANNEL constants (see below).
digitalOutPinState
If the pin is set as an output, it can be set high or low by a
combination of HRDL_DIGITAL_IO_CHANNEL constants (see
below).
enabledDigitalIn
Sets the digital input as active. Use a combination of
HRDL_DIGITAL_IO_CHANNEL constants (see below).
Returns
0 if failed,
1 if successful
If the function fails, call HRDLGetUnitInfo with info = HRDL_SETTINGS_ERROR (8) to
obtain the specific setting error.
Pin values for directionOut, digitalOutPinState and enabledDigitalIn
directionOut / enabledDigitalIn
Description
HRDL_DIGITAL_IO_CHANNEL_1 (1)
IO Pin 1
HRDL_DIGITAL_IO_CHANNEL_2 (2)
IO Pin 2
HRDL_DIGITAL_IO_CHANNEL_3 (4)
IO Pin 3
HRDL_DIGITAL_IO_CHANNEL_4 (8)
IO Pin 4