xref: /original-bsd/sys/vax/vax/flp.h (revision 80928ae4)
1 /*
2  * Copyright (c) 1982, 1986 Regents of the University of California.
3  * All rights reserved.  The Berkeley software License Agreement
4  * specifies the terms and conditions for redistribution.
5  *
6  *	@(#)flp.h	7.1 (Berkeley) 06/05/86
7  */
8 
9 #if VAX780
10 /*
11  * Console floppy command/status and sectoring information.
12  */
13 #define	FL_FFC		0x200		/* floppy function complete */
14 #define	FL_ERR		0x80		/* error bit in floppy status byte */
15 #define	FL_PERR		0x905		/* floppy protocol error */
16 #define	FL_DATA		0x100		/* floppy data select code */
17 #define	FL_RS		0x900		/* floppy read sector command */
18 #define	FL_WS		0x901		/* floppy write sector command*/
19 #define	FL_STAT		0x902		/* floppy get status command*/
20 #define	FL_CANCEL	0x904		/* cancel floppy function */
21 
22 #define	RXFTRK	77		/* tracks/floppy */
23 #define	RXSTRK	26		/* sectors/track */
24 #define	RXBYSEC	128		/* bytes/sector */
25 #define	MAXSEC (RXFTRK*RXSTRK) 	/* sectors/floppy */
26 
27 /*
28  * In the floppy driver routines, the device active byte is used
29  * not as a boolean, but as an indicator of the state we are in.
30  * That is, it contains what to do on the next interrupt.
31  */
32 
33 #define	FL_IDLE		0	/* floppy idle */
34 #define	FL_MAND		1	/* about to send read/write command */
35 #define	FL_SEC		2	/* about to send sector # to LSI */
36 #define	FL_TRACK	3	/* about to send track # to LSI */
37 #define	FL_DAX		4	/* transmitting data */
38 #define	FL_DAR		5	/* receiving data */
39 #define	FL_COM		6	/* completing transmission */
40 #define	FL_CAN		7	/* give cancel order - we had an error,
41 				   and are to restart */
42 
43 #define	FLERRS		5	/* number of retries before quitting */
44 
45 /*
46  * The state byte is used to retain exclusivity,
47  * and contains the busy flag.
48  */
49 #define	FL_OPEN		1
50 #define	FL_BUSY		2
51 #endif
52