BL4S200 User’s Manual
69
4.4.2 Digital I/O
setDigIn
int setDigIn(int channel);
FUNCTION DESCRIPTION
Sets a configurable I/O channel to be a general digital input.
PARAMETERS
channel
configurable I/O channel to be set as an input,
0–31 (pins DIO0–DIO31)
RETURN VALUE
0 — success.
-EINVAL
— invalid parameter value.
SEE ALSO
brdInit, digIn, digInBank
digIn
int digIn(int channel);
FUNCTION DESCRIPTION
Reads the state of a channel set to any form of digital input functionality.
PARAMETERS
channel
configurable I/O channel set as an input, 0–31 (pins DIO0–DIO31)
RETURN VALUE
The logic state of the specified channel.
0 — logic low
1 — logic high
-EINVAL
— channel value is out of range.
-EPERM
:— pin functionality does not permit this operation.
SEE ALSO
brdInit, setDigIn, digInBank
electronic components distributor