31
Programmer's reference
5.4.16 HRDLSetDigitalIOChannel (ADC-24 only)
int16_t HRDLSetDigitalIOChannel
(
int16_t handle,
int16_t directionOut,
int16_t digitalOutPinState,
int16_t 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
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
with
info = HRDL_SETTINGS_ERROR (8)
to obtain the specific setting error.
Pin values for
directionOut
,
digitalOutPinState
and
enabledDigitalIn
Pin value
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
adc20.en r6
Copyright © 2005–2016 Pico Technology Ltd. All rights reserved.