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:  *	@(#)rxreg.h	7.1 (Berkeley) 6/5/86
   7:  */
   8: 
   9: #ifdef KERNEL
  10: #include "ioctl.h"
  11: #else
  12: #include <sys/ioctl.h>
  13: #endif
  14: 
  15: /*
  16:  * RX02 registers
  17:  */
  18: struct rxdevice {
  19:     short   rxcs;       /* control/status register */
  20:     short   rxdb;       /* data buffer register */
  21: };
  22: 
  23: /*
  24:  * RX211 Command and Status Register (RX2CS)
  25:  */
  26: #define RX_DRV0     0x0000  /* select drive 0 */
  27: #define RX_DRV1     0x0010  /* select drive 1 */
  28: #define RX_DONE     0x0020  /* function complete */
  29: #define RX_INTR     0x0040  /* interrupt enable */
  30: #define RX_TREQ     0x0080  /* transfer request (data only)	*/
  31: #define RX_SDEN     0x0000  /* single density */
  32: #define RX_DDEN     0x0100  /* double density */
  33: #define RX_EXT      0x3000  /* extended address bits */
  34: #define RX_INIT     0x4000  /* initialize RX211 interface */
  35: #define RX_ERR      0x8000  /* general error bit */
  36: 
  37: /*
  38:  * RX211 control function bits (0-3 of RX2CS)
  39:  */
  40: #define RX_FILL     0x0001  /* fill the buffer */
  41: #define RX_EMPTY    0x0003  /* empty the buffer */
  42: #define RX_WRITE    0x0005  /* write the buffer to disk */
  43: #define RX_READ     0x0007  /* read a disk sector to the buffer */
  44: #define RX_FORMAT   0x0009  /* set the media density (format) */
  45: #define RX_RDSTAT   0x000b  /* read the disk status */
  46: #define RX_WDDS     0x000d  /* write a deleted-data sector */
  47: #define RX_RDERR    0x000f  /* read the error registers */
  48: 
  49: #define RXCS_BITS \
  50: "\20\20RX_ERR\17RX_INIT\11RX_DDEN\10RX_TREQ\7RX_IE\6RX_DONE\5RX_DRV1"
  51: 
  52: /*
  53:  * RX211 Error and Status Register (RX2ES) --
  54:  * information is located in RX2DB after completion of function.
  55:  * The READY bit's value is available only after a "read status".
  56:  */
  57: #define RXES_CRCERR 0x0001  /* CRC error (data read error) */
  58: #define RXES_IDONE  0x0004  /* reinitialization complete */
  59: #define RXES_DENERR 0x0010  /* density error */
  60: #define RXES_DBLDEN 0x0020  /* set if double density */
  61: #define RXES_DDMARK 0x0040  /* deleted-data mark */
  62: #define RXES_READY  0x0080  /* drive is ready */
  63: 
  64: #define RXES_BITS \
  65: "\20\14RXES_NXM\13RXES_WCOF\11RXES_DRV1\10RXES_RDY\7RXES_DDMK\6RXES_DDEN\5\
  66: RXES_DNER\4RXES_ACLO\3RXES_ID\1RXES_CRC"
  67: 
  68: /*
  69:  * Ioctl commands, move to dkio.h later
  70:  */
  71: #define RXIOC_FORMAT    _IOW(d, 1, int) /* format the disk */
  72: #define RXIOC_WDDS  _IOW(d, 2, int) /* write `deleted data' mark */
  73:                     /* on next sector */
  74: #define RXIOC_RDDSMK    _IOR(d, 3, int) /* did last read sector contain */
  75:                     /* `deleted data'?*/
  76: #define RXIOC_GDENS _IOR(d, 4, int) /* return density of current disk */
  77: 
  78: #ifdef RXDEFERR
  79: /*
  80:  * Table of values for definitive error code (rxxt[0] & 0xff)
  81:  */
  82: struct rxdeferr {
  83:     short   errval;
  84:     char    *errmsg;
  85: } rxdeferr[] = {
  86:     { 0010, "Can't find home on drive 0" },
  87:     { 0020, "Can't find home on drive 1" },
  88:     { 0040, "Bad track number requested" },
  89:     { 0050, "Home found too soon" },
  90:     { 0070, "Can't find desired sector" },
  91:     { 0110, "No SEP clock seen" },
  92:     { 0120, "No preamble found" },
  93:     { 0130, "Preamble, but no ID mark" },
  94:     { 0140, "Header CRC error"},
  95:     { 0150, "Track addr wrong in header" },
  96:     { 0160, "Too many tries for ID AM" },
  97:     { 0170, "No data AM found" },
  98:     { 0200, "Data CRC error" },
  99:     { 0220, "Maintenance test failure" },
 100:     { 0230, "Word count overflow" },
 101:     { 0240, "Density error" },
 102:     { 0250, "Set-density protocol bad" },
 103:     { 0,    "Undefined error code" }
 104: };
 105: #endif

Defined variables

rxdeferr defined in line 85; never used

Defined struct's

rxdeferr defined in line 82; never used
rxdevice defined in line 18; used 20 times

Defined macros

RXCS_BITS defined in line 49; used 1 times
RXES_BITS defined in line 64; used 1 times
RXES_CRCERR defined in line 57; used 1 times
RXES_DBLDEN defined in line 60; used 1 times
RXES_DDMARK defined in line 61; used 1 times
RXES_DENERR defined in line 59; used 1 times
RXES_IDONE defined in line 58; never used
RXES_READY defined in line 62; used 3 times
RXIOC_FORMAT defined in line 71; never used
RXIOC_GDENS defined in line 76; never used
RXIOC_RDDSMK defined in line 74; never used
RXIOC_WDDS defined in line 72; never used
RX_DDEN defined in line 32; used 5 times
RX_DONE defined in line 28; used 3 times
RX_DRV0 defined in line 26; used 1 times
RX_DRV1 defined in line 27; used 1 times
RX_EMPTY defined in line 41; used 1 times
RX_ERR defined in line 35; used 1 times
RX_EXT defined in line 33; never used
RX_FILL defined in line 40; used 1 times
RX_FORMAT defined in line 44; used 1 times
RX_INIT defined in line 34; used 3 times
RX_INTR defined in line 29; used 2 times
RX_RDERR defined in line 47; used 1 times
RX_RDSTAT defined in line 45; used 2 times
RX_READ defined in line 43; used 1 times
RX_SDEN defined in line 31; used 1 times
RX_TREQ defined in line 30; used 7 times
RX_WDDS defined in line 46; used 1 times
RX_WRITE defined in line 42; used 1 times

Usage of this include

rxreg.h used 1 times
Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 940
Valid CSS Valid XHTML 1.0 Strict