Go to the documentation of this file. 1 #ifndef __DRIVERS_PARIDE_H__
2 #define __DRIVERS_PARIDE_H__
18 #define PARIDE_H_VERSION "1.01"
48 unsigned long private;
100 #define delay_p (pi->delay?udelay(pi->delay):(void)0)
101 #define out_p(offs,byte) outb(byte,pi->port+offs); delay_p;
102 #define in_p(offs) (delay_p,inb(pi->port+offs))
104 #define w0(byte) {out_p(0,byte);}
105 #define r0() (in_p(0) & 0xff)
106 #define w1(byte) {out_p(1,byte);}
107 #define r1() (in_p(1) & 0xff)
108 #define w2(byte) {out_p(2,byte);}
109 #define r2() (in_p(2) & 0xff)
110 #define w3(byte) {out_p(3,byte);}
111 #define w4(byte) {out_p(4,byte);}
112 #define r4() (in_p(4) & 0xff)
113 #define w4w(data) {outw(data,pi->port+4); delay_p;}
114 #define w4l(data) {outl(data,pi->port+4); delay_p;}
115 #define r4w() (delay_p,inw(pi->port+4)&0xffff)
116 #define r4l() (delay_p,inl(pi->port+4)&0xffffffff)
118 static inline u16 pi_swab16(
char *
b,
int k)
120 {
union {
u16 u;
char t[2]; }
r;
122 r.t[0]=b[2*k+1];
r.t[1]=b[2*
k];
126 static inline u32 pi_swab32(
char *
b,
int k)
128 {
union {
u32 u;
char f[4]; }
r;
130 r.f[0]=b[4*k+1];
r.f[1]=b[4*
k];
131 r.f[2]=b[4*k+3];
r.f[3]=b[4*k+2];