7 #include <linux/types.h>
9 void XGINew_SetReg1(unsigned long,unsigned short,unsigned short);
10 void XGINew_SetReg2(unsigned long,unsigned short,unsigned short);
11 void XGINew_SetReg3(unsigned long,unsigned short);
12 void XGINew_SetReg4(unsigned long,unsigned long);
13 unsigned char XGINew_GetReg1(unsigned long, unsigned short);
14 unsigned char XGINew_GetReg2(unsigned long);
15 unsigned long XGINew_GetReg3(unsigned long);
16 void XGINew_ClearDAC(unsigned char *);
17 void XGINew_SetRegANDOR(unsigned long Port,unsigned short Index,
18 unsigned short DataAND,unsigned short DataOR);
19 void XGINew_SetRegOR(unsigned long Port,unsigned short Index,
20 unsigned short DataOR);
21 void XGINew_SetRegAND(unsigned long Port,unsigned short Index,
22 unsigned short DataAND);
25 /* --------------------------------------------------------------------- */
26 /* Function : XGINew_SetReg1 */
29 /* Description : SR CRTC GR */
30 /* --------------------------------------------------------------------- */
31 void XGINew_SetReg1( unsigned long port , unsigned short index , unsigned short data )
38 /* --------------------------------------------------------------------- */
39 /* Function : XGINew_SetReg2 */
42 /* Description : AR( 3C0 ) */
43 /* --------------------------------------------------------------------- */
44 /*void XGINew_SetReg2( unsigned long port , unsigned short index , unsigned short data )
46 InPortByte((P unsigned char )port + 0x3da - 0x3c0) ;
47 OutPortByte( XGINew_P3c0 , index ) ;
48 OutPortByte( XGINew_P3c0 , data ) ;
49 OutPortByte( XGINew_P3c0 , 0x20 ) ;
53 /* --------------------------------------------------------------------- */
58 /* --------------------------------------------------------------------- */
59 void XGINew_SetReg3( unsigned long port , unsigned short data )
65 /* --------------------------------------------------------------------- */
66 /* Function : XGINew_SetReg4 */
70 /* --------------------------------------------------------------------- */
71 void XGINew_SetReg4( unsigned long port , unsigned long data )
77 /* --------------------------------------------------------------------- */
78 /* Function : XGINew_GetReg1 */
82 /* --------------------------------------------------------------------- */
83 unsigned char XGINew_GetReg1(unsigned long port, unsigned short index)
88 data = inb(port + 1) ;
93 /* --------------------------------------------------------------------- */
94 /* Function : XGINew_GetReg2 */
98 /* --------------------------------------------------------------------- */
99 unsigned char XGINew_GetReg2(unsigned long port)
109 /* --------------------------------------------------------------------- */
110 /* Function : XGINew_GetReg3 */
114 /* --------------------------------------------------------------------- */
115 unsigned long XGINew_GetReg3( unsigned long port )
126 /* --------------------------------------------------------------------- */
127 /* Function : XGINew_SetRegANDOR */
131 /* --------------------------------------------------------------------- */
132 void XGINew_SetRegANDOR( unsigned long Port , unsigned short Index , unsigned short DataAND , unsigned short DataOR )
134 unsigned short temp ;
136 temp = XGINew_GetReg1( Port , Index ) ; /* XGINew_Part1Port index 02 */
137 temp = ( temp & ( DataAND ) ) | DataOR ;
138 XGINew_SetReg1( Port , Index , temp ) ;
142 /* --------------------------------------------------------------------- */
143 /* Function : XGINew_SetRegAND */
147 /* --------------------------------------------------------------------- */
148 void XGINew_SetRegAND(unsigned long Port,unsigned short Index,unsigned short DataAND)
150 unsigned short temp ;
152 temp = XGINew_GetReg1( Port , Index ) ; /* XGINew_Part1Port index 02 */
154 XGINew_SetReg1( Port , Index , temp ) ;
158 /* --------------------------------------------------------------------- */
159 /* Function : XGINew_SetRegOR */
163 /* --------------------------------------------------------------------- */
164 void XGINew_SetRegOR( unsigned long Port , unsigned short Index , unsigned short DataOR )
166 unsigned short temp ;
168 temp = XGINew_GetReg1( Port , Index ) ; /* XGINew_Part1Port index 02 */
170 XGINew_SetReg1( Port , Index , temp ) ;
174 /* --------------------------------------------------------------------- */
175 /* Function : NewDelaySecond */
179 /* --------------------------------------------------------------------- */
180 void NewDelaySeconds( int seconds )
185 for( i = 0 ; i < seconds ; i++ )
194 /* --------------------------------------------------------------------- */
195 /* Function : Newdebugcode */
199 /* --------------------------------------------------------------------- */
200 void Newdebugcode(unsigned char code)
202 // OutPortByte ( 0x80 , code ) ;
203 /* OutPortByte ( 0x300 , code ) ; */
204 /* NewDelaySeconds( 0x3 ) ; */