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