Lines Matching refs:pi
47 static int on26_read_regr( PIA *pi, int cont, int regr )
53 switch (pi->mode) {
76 static void on26_write_regr( PIA *pi, int cont, int regr, int val )
82 switch (pi->mode) {
102 static void on26_connect ( PIA *pi )
106 pi->saved_r0 = r0();
107 pi->saved_r2 = r2();
110 x = 8; if (pi->mode) x = 9;
116 static void on26_disconnect ( PIA *pi )
118 { if (pi->mode >= 2) { w3(4); w3(4); w3(4); w3(4); }
121 w0(pi->saved_r0);
122 w2(pi->saved_r2);
127 static int on26_test_port( PIA *pi) /* hard reset */
131 pi->saved_r0 = r0();
132 pi->saved_r2 = r2();
134 d = pi->delay;
135 m = pi->mode;
136 pi->delay = 5;
137 pi->mode = 0;
158 on26_write_regr(pi,0,6,0xa0);
161 on26_write_regr(pi,0,6,0xa0);
162 x = on26_read_regr(pi,0,7);
163 on26_write_regr(pi,0,6,0xb0);
164 y = on26_read_regr(pi,0,7);
177 pi->delay = d;
178 pi->mode = m;
179 w0(pi->saved_r0);
180 w2(pi->saved_r2);
186 static void on26_read_block( PIA *pi, char * buf, int count )
190 switch (pi->mode) {
235 static void on26_write_block( PIA *pi, char * buf, int count )
239 switch (pi->mode) {
243 w0(2); P1; w0(0x18+pi->mode); P2; w0(0); P1;
250 w0(2); P1; w0(8+pi->mode); P2;
278 static void on26_log_adapter( PIA *pi, char * scratch, int verbose )
284 pi->device,ON26_VERSION,pi->port);
285 printk("mode %d (%s), delay %d\n",pi->mode,
286 mode_string[pi->mode],pi->delay);