bpp_io.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1990,1991,1997-1998 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_BPP_IO_H
#define _SYS_BPP_IO_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* I/O header file for the bidirectional parallel port
* driver (bpp) for the Zebra SBus card.
*/
#ifdef __cplusplus
extern "C" {
#endif
/* #defines (not struct elements) below */
/*
* Minor device number encoding (should not be here):
*/
/*
* ioctl defines for cmd argument
*/
/* set contents of transfer parms structure */
/* read contents of transfer parms structure */
/* set contents of output pins structure */
/* read contents of output pins structure */
/* read contents of snapshot error status structure */
/* pretend to attempt a data transfer */
/* ioctl values 7-12 are test-only and are reserved */
/* Structure definitions and locals #defines below */
/* 30 minutes */
/*
* #defines and enum variables, and general comments for the
* bpp_transfer_parms structure.
*/
/* Values for read_handshake and write_handshake fields */
enum handshake_t {
/* read_handshake only! */
/* read_handshake only! */
/* The following handshakes are RESERVED. Do not use. */
};
/*
* The read_setup_time field indicates
* dstrb- to bsy+ in BPP_HS_NOHS or BPP_HS_ACKHS
* dstrb- to ack+ in BPP_HS_ACKHS or BPP_HS_ACKBUSYHS
* ack- to dstrb+ in BPP_HS_XSCANHS
*
* The read_strobe_width field indicates
* ack+ to ack- in BPP_HS_ACKHS or BPP_HS_ACKBUSYHS
* dstrb+ to dstrb- in BPP_HS_XSCANHS
*/
/* Values allowed for write_handshake field */
/*
* these are duplicates of the definitions above
* BPP_HS_NOHS
* BPP_HS_ACKHS
* BPP_HS_BUSYHS
*/
/*
* The write_setup_time field indicates
* data valid to dstrb+ in all handshakes
*
* The write_strobe_width field indicates
* dstrb+ to dstrb- in non-reserved handshakes
* minimum dstrb+ to dstrb- in BPP_HS_VPRINTHS or BPP_HS_VPLOTHS
*/
/*
* This structure is used to configure the hardware handshake and
* timing modes.
*/
struct bpp_transfer_parms {
enum handshake_t
read_handshake; /* parallel port read handshake mode */
int read_setup_time; /* DSS register - in nanoseconds */
int read_strobe_width; /* DSW register - in nanoseconds */
int read_timeout; /* wait this many microseconds */
/* before aborting a transfer */
enum handshake_t
write_handshake; /* parallel port write handshake mode */
int write_setup_time; /* DSS register - in nanoseconds */
int write_strobe_width; /* DSW register - in nanoseconds */
int write_timeout; /* wait this many microseconds */
/* before aborting a transfer */
};
struct bpp_pins {
};
/*
* #defines and general comments for
* the bpp_pins structure.
*/
/* Values for output_reg_pins field */
/* Values for input_reg_pins field */
struct bpp_error_status {
char timeout_occurred; /* 1 if a timeout occurred */
char bus_error; /* 1 if an SBus bus error */
/* cause an error */
};
/*
* #defines for the bpp_error_status structure
*/
/* Values for pin_status field */
#ifdef __cplusplus
}
#endif
#endif /* !_SYS_BPP_IO_H */