BL4S100 User’s Manual
62
setDigOut
int setDigOut(int channel, int state);
FUNCTION DESCRIPTION
Configures the output channel as a simple digital output. The output state of the chan-
nel is also initialized to logic 0 or logic 1 based on the
state
parameter. The digOut
function should be used to control the output state after configuration as it is more effi-
cient. This function is non-reentrant.
PARAMETERS
channel
digital output channel, 0–7 (OUT0–OUT7)
state
set output to one of the following states:
0 — connects the load to GND
1 — puts the output in a high-impedance state
RETURN VALUE
0 — success.
-EINVAL
— invalid parameter value.
SEE ALSO
brdInit, digOut, digOutBank