00001 /*++ BUILD Version: 0002 // Increment this if a change has global effects 00002 00003 Module Name: 00004 00005 jnsnserp.h 00006 00007 Abstract: 00008 00009 This header file defines the Alpha/Jensen serial port registers. 00010 00011 Author: 00012 00013 David N. Cutler (davec) 28-Apr-1991 00014 00015 00016 Revision History: 00017 00018 15-April-1992 John DeRosa [DEC] 00019 00020 Made this file from David's MIPS version. 00021 00022 --*/ 00023 00024 #ifndef _JNSNSERP_ 00025 #define _JNSNSERP_ 00026 00027 // 00028 // Define serial port read registers structure. 00029 // 00030 00031 typedef struct _SP_READ_REGISTERS { 00032 UCHAR ReceiveBuffer; 00033 UCHAR InterruptEnable; 00034 UCHAR InterruptId; 00035 UCHAR LineControl; 00036 UCHAR ModemControl; 00037 UCHAR LineStatus; 00038 UCHAR ModemStatus; 00039 UCHAR ScratchPad; 00040 } SP_READ_REGISTERS, *PSP_READ_REGISTERS; 00041 00042 // 00043 // Define define serial port write registers structure. 00044 // 00045 00046 typedef struct _SP_WRITE_REGISTERS { 00047 UCHAR TransmitBuffer; // also DLL 00048 UCHAR InterruptEnable; // also DLM 00049 UCHAR Reserved0; 00050 UCHAR LineControl; 00051 UCHAR ModemControl; 00052 UCHAR Reserved1; 00053 UCHAR Reserved2; 00054 UCHAR ScratchPad; 00055 } SP_WRITE_REGISTERS, *PSP_WRITE_REGISTERS; 00056 00057 // 00058 // Define serial port interrupt enable register structure. 00059 // 00060 00061 typedef struct _SP_INTERRUPT_ENABLE { 00062 UCHAR ReceiveEnable : 1; 00063 UCHAR TransmitEnable : 1; 00064 UCHAR LineStatusEnable : 1; 00065 UCHAR ModemStatusEnable : 1; 00066 UCHAR Reserved1 : 4; 00067 } SP_INTERRUPT_ENABLE, *PSP_INTERRUPT_ENABLE; 00068 00069 // 00070 // Define serial port interrupt id register structure. 00071 // 00072 00073 typedef struct _SP_INTERRUPT_ID { 00074 UCHAR InterruptPending : 1; 00075 UCHAR Identification : 2; 00076 UCHAR Reserved : 5; 00077 } SP_INTERRUPT_ID, *PSP_INTERRUPT_ID; 00078 00079 00080 // 00081 // Define serial port line control register structure. 00082 // 00083 00084 typedef struct _SP_LINE_CONTROL { 00085 UCHAR CharacterSize : 2; 00086 UCHAR StopBits : 1; 00087 UCHAR ParityEnable : 1; 00088 UCHAR EvenParity : 1; 00089 UCHAR StickParity : 1; 00090 UCHAR SetBreak : 1; 00091 UCHAR DivisorLatch : 1; 00092 } SP_LINE_CONTROL, *PSP_LINE_CONTROL; 00093 00094 // 00095 // Line status register character size definitions. 00096 // 00097 00098 #define FIVE_BITS 0x0 // five bits per character 00099 #define SIX_BITS 0x1 // six bits per character 00100 #define SEVEN_BITS 0x2 // seven bits per character 00101 #define EIGHT_BITS 0x3 // eight bits per character 00102 00103 // 00104 // Line speed divisor definition. 00105 // 00106 00107 #define BAUD_RATE_9600 12 // divisor for 9600 baud 00108 #define BAUD_RATE_19200 6 // divisor for 19200 baud 00109 00110 // 00111 // Define serial port modem control register structure. 00112 // 00113 00114 typedef struct _SP_MODEM_CONTROL { 00115 UCHAR DataTerminalReady : 1; 00116 UCHAR RequestToSend : 1; 00117 UCHAR Reserved1 : 1; 00118 UCHAR Interrupt : 1; 00119 UCHAR loopBack : 1; 00120 UCHAR Reserved2 : 3; 00121 } SP_MODEM_CONTROL, *PSP_MODEM_CONTROL; 00122 00123 00124 // 00125 // Define serial port line status register structure. 00126 // 00127 00128 typedef struct _SP_LINE_STATUS { 00129 UCHAR DataReady : 1; 00130 UCHAR OverrunError : 1; 00131 UCHAR ParityError : 1; 00132 UCHAR FramingError : 1; 00133 UCHAR BreakIndicator : 1; 00134 UCHAR TransmitHoldingEmpty : 1; 00135 UCHAR TransmitEmpty : 1; 00136 UCHAR Reserved0 : 1; 00137 } SP_LINE_STATUS, *PSP_LINE_STATUS; 00138 00139 // 00140 // Define serial port modem status register structure. 00141 // 00142 00143 typedef struct _SP_MODEM_STATUS { 00144 UCHAR DeltaClearToSend : 1; 00145 UCHAR DeltaDataSetReady : 1; 00146 UCHAR TrailingRingIndicator : 1; 00147 UCHAR DeltaReceiveDetect : 1; 00148 UCHAR ClearToSend : 1; 00149 UCHAR DataSetReady : 1; 00150 UCHAR RingIndicator : 1; 00151 UCHAR ReceiveDetect : 1; 00152 } SP_MODEM_STATUS, *PSP_MODEM_STATUS; 00153 00154 #endif // _JNSNSERP_