NAME
obuf - digital output buffer user functions
SYNOPSIS
#include <obuf_u.h>
obread (pvalue)
unsigned *pvalue;
obwrite(value)
unsigned value;
obon (b)
unsigned b;
oboff (b)
unsigned b;
DESCRIPTION
obread
and
obwrite
read from and write to a 16-bit digital-output buffer.
pvalue
contains the address for storing the value that
obread
reads;
obwrite
writes
value
into the output buffer. For example, the call
obwrite(0)
sets all output bits low. The call
obwrite(255)
sets all bits high. By changing the parameter
various output bits can be set low or high (based on its binary
representation).
obon
and
oboff
turn on or off a selected bit in the 16-bit digital-output buffer
without affecting the status of other bits in the buffer.
obon
sets bit
b
of the output buffer where
b
is between 1 and 16.
oboff
clears bit
b
of the output buffer.
FILES
/dev/hco0
SEE ALSO
hco(4P)
DIAGNOSTICS
obon
and
oboff
returns -1 if
b
is out of range.