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