1: /*
2: * Copyright (c) 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: * @(#)rkreg.h 1.1 (2.10BSD Berkeley) 12/1/86
7: */
8:
9: struct rkdevice
10: {
11: short rkds;
12: short rker;
13: short rkcs;
14: short rkwc;
15: caddr_t rkba;
16: short rkda;
17: };
18:
19: /* bits in rkds; all are read only */
20: /* bits 15-13 are drive identification */
21: #define RK_DPL 0010000 /* drive power low */
22: #define RK_RK05 0004000 /* drive is an rk05; always 1 */
23: #define RK_DRU 0002000 /* drive unsafe */
24: #define RK_SIN 0001000 /* seek incomplete */
25: #define RK_SOK 0000400 /* sector counter ok */
26: #define RK_DRY 0000200 /* drive ready */
27: #define RK_RWSRDY 0000100 /* read/write/seek ready */
28: #define RK_WPS 0000040 /* write protect status */
29: #define RK_SKC 0000020 /* seek complete */
30: /* bits 3-0 are sector counter */
31: #define RK_BITS \
32: "\10\15DPL\13DRU\12SIN\11SOK\10DRY\7RWSRDY\6WPS\5SKC"
33:
34: /* bits in rker; all are read only */
35: #define RKER_DRE 0100000 /* drive error */
36: #define RKER_OVR 0040000 /* overrun */
37: #define RKER_WLO 0020000 /* write lock out violation */
38: #define RKER_SKE 0010000 /* seek error */
39: #define RKER_PGE 0004000 /* programming error */
40: #define RKER_NXM 0002000 /* nonexistent memory */
41: #define RKER_DLT 0001000 /* data late */
42: #define RKER_TE 0000400 /* timing error */
43: #define RKER_NXD 0000200 /* nonexistent disk */
44: #define RKER_NXC 0000100 /* nonexistent cylinder */
45: #define RKER_NXS 0000040 /* nonexistent sector */
46: /* bits 4-2 are unused */
47: #define RKER_CSE 0000002 /* checksum error */
48: #define RKER_WCE 0000001 /* write check error */
49: #define RKER_BITS \
50: "\10\20DRE\17OVR\16WLO\15SKE\14PGE\13NXM\12DLT\11TE\10NXD\
51: \7NXC\6NXS\2CSE\1WCE"
52:
53: /* bits in rkcs */
54: #define RKCS_ERR 0100000 /* error */
55: #define RKCS_HE 0040000 /* hard error */
56: #define RKCS_SCP 0020000 /* search complete */
57: /* bit 12 is unused */
58: #define RKCS_INHBA 0004000 /* inhibit bus address increment */
59: #define RKCS_FMT 0002000 /* format */
60: /* bit 9 is unused */
61: #define RKCS_SSE 0000400 /* stop on soft error */
62: #define RKCS_RDY 0000200 /* control ready */
63: #define RKCS_IDE 0000100 /* interrupt on done enable */
64: /* bits 5-4 are the UNIBUS extension bits */
65: /* bits 3-1 is the command */
66: #define RKCS_GO 0000001 /* go */
67: #define RKCS_BITS \
68: "\10\20ERR\17HE\16SCP\15INHBA\14FMT\13SSE\12RDY\11IDE\1GO"
69:
70: /* commands */
71: #define RKCS_RESET 0000000 /* control reset */
72: #define RKCS_WCOM 0000002 /* write */
73: #define RKCS_RCOM 0000004 /* read */
74: #define RKCS_WCHK 0000006 /* write check */
75: #define RKCS_SEEK 0000010 /* seek */
76: #define RKCS_RCHK 0000012 /* read check */
77: #define RKCS_DRESET 0000014 /* drive reset */
78: #define RKCS_WLCK 0000016 /* write lock */
79:
80: /* bits in rkda */
81: /* bits 15-13 are drive select */
82: /* bits 12-5 are cylinder address */
83: #define RKDA_SUR 0000020 /* surface */
84: /* bits 3-0 are sector address */
Defined struct's
Defined macros
Usage of this include