1: struct rldevice
2: {
3: short rlcs;
4: caddr_t rlba;
5: short rlda;
6: short rlmp;
7: };
8:
9: /* bits in rlcs */
10: #define RL_CERR 0100000 /* composite error */
11: #define RL_DRE 0040000 /* drive error */
12: #define RL_NXM 0020000 /* nonexistent memory */
13: #define RL_DLHNF 0010000 /* data late or header not found */
14: #define RL_CRC 0004000 /* data crc or header check or write check */
15: #define RL_OPI 0002000 /* operation incomplete */
16: /* bits 9-8 are drive select */
17: #define RL_CRDY 0000200 /* controller ready */
18: #define RL_IE 0000100 /* interrupt enable */
19: /* bits 5-4 are the UNIBUS address extension bits */
20: /* bits 3-0 is the function code */
21: #define RL_HARDERR (RL_NXM|RL_DLHNF|RL_CRC|RL_OPI)
22:
23: /* commands */
24: #define RL_NOP 0000000 /* no operation */
25: #define RL_WCHK 0000002 /* write check data */
26: #define RL_GETSTATUS 0000004 /* get status */
27: #define RL_SEEK 0000006 /* seek */
28: #define RL_RHDR 0000010 /* read header */
29: #define RL_WCOM 0000012 /* write data */
30: #define RL_RCOM 0000014 /* read data */
31: #define RL_RWHCHK 0000016 /* read data without header check */
32:
33: #define RL_BITS \
34: "\10\20CERR\17DRE\16NXM\15DLHNF\14CRC\13OPI\10CRDY\7IE"
35:
36: /* bits in rlda: just be thankful there's a one to one correspondence */
37: #define RLDA_RW_HSEL 0000100 /* head select during read or write */
38: #define RLDA_SEEK_HSEL 0000020 /* head select during seek*/
39: #define RLDA_RESET 0000011 /* reset during get status */
40: #define RLDA_SEEKHI 0000005 /* seek to higher address */
41: #define RLDA_SEEKLO 0000001 /* seek to lower address */
42: #define RLDA_GS 0000003 /* get status */
43:
44: #define RLDA_BITS \
45: "\10\7RW_HSEL\5SEEK_HSEL\4GS_RESET\3SEEK_DIR"
46:
47: /* bits in rlmp */
48: #define RLMP_WDE 0100000 /* write data error */
49: #define RLMP_HCE 0040000 /* head current error */
50: #define RLMP_WLE 0020000 /* write lock */
51: #define RLMP_STIMO 0010000 /* seek timeout */
52: #define RLMP_SPE 0004000 /* spin error */
53: #define RLMP_WGE 0002000 /* write gate error */
54: #define RLMP_VCHK 0001000 /* volume check */
55: #define RLMP_DSE 0000400 /* drive select error */
56: #define RLMP_DTYP 0000200 /* drive type: 0 == RL01, 1 == RL02 */
57: #define RLMP_HSEL 0000100 /* head select */
58: #define RLMP_CO 0000040 /* cover open */
59: #define RLMP_HO 0000020 /* heads out */
60: #define RLMP_BH 0000010 /* brush home */
61: /* bits 2-0 are the state */
62:
63: /* status bits */
64: #define RLMP_LOAD 0000000 /* load cartridge */
65: #define RLMP_SU 0000001 /* spin up */
66: #define RLMP_BC 0000002 /* brush cycle */
67: #define RLMP_LH 0000003 /* load heads */
68: #define RLMP_SEEK 0000004 /* seek */
69: #define RLMP_LCKON 0000005 /* lock on */
70: #define RLMP_UH 0000006 /* unload heads */
71: #define RLMP_SD 0000007 /* spin down */
72:
73: #define RLMP_BITS \
74: "\10\20WDE\17HCE\16WLE\15STIMO\14SPE\13WGE\12VCHK\11DSE\10DTYP\
75: \7HSEL\6CO\5HO\4BH"
Defined struct's
Defined macros
RL_IE
defined in line
18; used 2 times
Usage of this include