Technical data
bpp(7D) Devices SunOS 5.5
IOCTLS The following ioctl requests are supported:
BPPIOC_SETPARMS
Set transfer parameters.
The argument is a pointer to a bpp_transfer_parms structure. See
below for a description of the elements of this structure. If a parameter
is out of range, EINVAL is returned.
BPPIOC_GETPARMS
Get current transfer parameters.
The argument is a pointer to a bpp_transfer_parms structure. See
below for a description of the elements of this structure. If no parame-
ters have been configured since the device was opened, the contents of
the structure will be the default conditions of the parameters (see
Default Operation above).
BPPIOC_SETOUTPINS
Set output pin values.
The argument is a pointer to a bpp_pins structure. See below for a
description of the elements of this structure. If a parameter is out of
range, EINVAL is returned.
BPPIOC_GETOUTPINS
Read output pin values.
The argument is a pointer to a bpp_pins structure. See below for a
description of the elements of this structure.
BPPIOC_GETERR
Get last error status.
The argument is a pointer to a bpp_error_status structure. See below
for a description of the elements of this structure. This structure indi-
cates the status of all the appropriate status bits at the time of the most
recent error condition during a read(2) or write(2) call, or the status of
the bits at the most recent BPPIOC_TESTIO ioctl request. Note: The bits
in the pin_status element indicate whether the associated pin is active,
not the actual polarity. The application can check transfer readiness
without attempting another transfer using theBPPIOC_TESTIO ioctl.
Note: The timeout_occurred and bus_error fields will never be set by
the BPPIOC_TESTIO ioctl, only by an actual failed transfer.
BPPIOC_TESTIO
Test transfer readiness.
This command checks to see if a read or write transfer would succeed
based on pin status, opened mode, and handshake selected. If a
handshake would succeed, 0 is returned. If a transfer would fail, -1 is
returned, and errno is set to EIO, and the error status information is cap-
tured. The captured status can be retrieved using theBPPIOC_GETERR
ioctl call. Note that the timeout_occurred and bus_error fields will
never be set by this ioctl.
7D-44 modified 22 Aug 1994










