/* $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

#ident	"$Header: lp_space.c 1.19 90/04/24 $"

/*
 * conf_lp.c
 *	Systech line printer binary configuration file.
 */

/* $Log:	lp_space.c,v $
 */

#include "sys/types.h"
#include "sys/devsw.h"
#include "sys/session.h"
#include "sys/stream.h"
#include "sys/lp.h"	
#include "sys/lp_device.h"	
#include "sys/printer.h"

/*
 * Parallel line printer configuration.
 *
 * When configuring a printer, it is best to insure
 * that the printer has passed the self-test procedure described
 * in the hardware reference manual for the mlp-2000 controller.
 * If the printer does not pass the self-test, check to see if
 * the cable to the printer is properly configured according to the
 * controller manual (this may save a service call). In particular
 * pins 32-34 of the cable should not be connected if the printer
 * is using a Centronics interface.
 *
 * For details on configuration, see lp(7).  The special_map field is
 * defined to contain one of:
 *
 * PRSPECIAL: 		Align the form on device open and close and
 *			interpret newlines, backspaces, tabs and form feeds.
 * PRCAPS:		Upper case only mode - printer assumed to have a
 *			small character set.
 * PRRAW:		Pass all 8 bits to the printer without interpretation.
 *
 * Note that the printer is always in PRRAW mode unless a processing
 * module (lpmod) is pushed on top of it, as the driver does not
 * do any special processing of characters.  The page width and
 * height fields are not interpreted by the driver either.
 * The height parameter is currently not used by driver or module. 
 * Remember to have two configurations per board!
 */
struct	lp_printer	lpconfig[] = {

/*	cols,	ht,	special_map	 	  lp# */

{	132,	66,	PRRAW	} ,		/* 0 */
{	132,	66,	PRRAW  } ,		/* 1 */
};

int	lpprinters = sizeof(lpconfig) / sizeof(struct lp_printer);
#include "sys/autoconf.h"
#include "sys/multibus.h"
#include "config.h"

ulong lp_flags = 0;
unchar lp_bin = 5;

/* configuration table for the lp device on the multibus bus */
struct device_config lp_multibus_config[] = {
	/* length, space, address, interrupt */
/* 0 */		{ 0x20, MULTIBUS_IO_SPACE, 0x400, 2, },
		{ -1, },
};

/* autoconfig structure linking device configuration with busses */
struct dev_on_bus lp_on_busses[] = {
	{ MULTIBUS, 1, lp_multibus_config }, 
	{ NOBUS,},
};

/* device operations */
extern	struct	streamtab lpinfo;
extern	int	nulldev();
extern	int	nodev();
extern	int	nostrmsgio();
extern	int	nostrpoll();

struct devops lpdevops = {
	nulldev,		/* d_open */
	nulldev,		/* d_close */
	nulldev,		/* d_strat */
	nulldev,		/* d_minphys */
	nulldev,		/* d_size */
	nulldev,		/* d_print */
	nulldev,		/* d_read */
	nulldev,		/* d_write */
	nodev,			/* d_ioctl */
	nulldev,		/* d_mmap */
	nulldev,		/* d_intr */
	&lpinfo,		/* d_str */
	nostrmsgio,		/* d_strmsgio */
	nostrpoll		/* d_strpoll */
};
