bpp_var.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 1990,1991,1997-1998,2002-2003 Sun Microsystems, Inc.
* All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_BPP_VAR_H
#define _SYS_BPP_VAR_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Local variables header file for the bidirectional parallel port
* driver (bpp) for the Zebra SBus card.
*/
#ifdef __cplusplus
extern "C" {
#endif
/* #defines (not struct elements) below */
/* Other external ioctls are defined in bpp_io.h */
/* FOR TEST - request fakeout simulate partial data transfer */
/* FOR TEST - request value of DMA_BCNT at end of last data transfer */
/* FOR TEST - get contents of device registers */
/* FOR TEST - set special error code to simulate errors */
/* FOR TEST - get pointer to (fakely) "transferred" data */
/* FOR TEST - test nested timeout calls */
/* Structure definitions and locals #defines below */
struct bpp_unit /* Unit structure - one per unit */
{
int flags; /* bpp flags */
int openflags; /* read-write flags */
/* this unit opened with */
/* returned from timeout() */
/* passed to untimeout() */
/* returned from timeout() */
/* passed to untimeout() */
int sbus_clock_cycle; /* SBus clock cycle time */
/* for this unit */
enum trans_type { /* saves state last transfer */
read_trans, /* on this unit - needed for */
write_trans /* scanners */
} last_trans;
/* interrupt block cookie */
/* from ddi_add_intr */
/* DMA handle given by */
/* ddi_dma_buf_setup() */
long transfer_remainder; /* number of bytes which */
/* were not transferred */
/* since they were across */
/* the max DVMA boundary. */
/* value is (0) when transfer */
/* is within the boundary */
/* for bpp_intr */
volatile struct bpp_regs *bpp_regs_p;
/* Device control regs. */
struct bpp_transfer_parms transfer_parms;
/* handshake and timing */
};
/* defines for the flags field */
/* defines for the timeouts field */
/* lint garbage */
#ifdef __lint
int _ZERO_; /* "constant in conditional context" workaround */
#else /* __lint */
#define _ZERO_ 0
#define _ONE_ 1
#endif /* __lint */
/* statement macro */
#ifdef __cplusplus
}
#endif
#endif /* !_SYS_BPP_VAR_H */