Z-World Wolf BL2600 User Manual page 52

C-programmable single-board computer with ethernet
Table of Contents

Advertisement

int digIn(int channel);
Reads the state of a digital input channel. If a configurable I/O channel (DIO00–DIO15) that was config-
ured as a digital output is read by digIn, then the value read will be the state of the output channel.
A run-time error will occur for the following conditions:
1. channel out of range.
2. brdInit was not executed before executing digIn.
PARAMETER
channel is the input channel number (0–15 for DIO00–DIO15, 16–31 for IN16–IN31).
RETURN VALUE
The logic state of the specified channel (0 = low or 1 = high).
SEE ALSO
brdInit, digOut, digOutConfig, digInBank
char digInBank(int bank);
Reads the state of a bank of 8 digital input channels. If a configurable I/O channel (DIO00–DIO15) that
was configured as a digital output is read by digInBank, then the value returned will be the state of the
output channel.
A run-time error will occur for the following conditions:
1. bank out of range.
2. brdInit was not executed before executing digInBank.
PARAMETER
bank is the bank of digital input channels to read.
0 = DIO00–DIO07 (bank 0)
1 = DIO08–DIO15 (bank 1)
2 = IN16–IN23 (bank 2)
3 = IN24–IN31 (bank 3)
RETURN VALUE
The logic state of each channel in the specified bank (0 = low or 1 = high). The data is returned as a byte,
with each bit representing the state of a particular channel in the bank ordered from the most significant
bit to the least significant bit.
SEE ALSO
brdInit, digOut, digOutConfig, digInBank
48
Wolf (BL2600)

Advertisement

Table of Contents
loading

Related Products for Z-World Wolf BL2600

Table of Contents