Lines Matching refs:k

117 	int i[2], j[2], t[2], p, k;  in tmdc_read_packet()  local
121 for (k = 0; k < 2; k++) { in tmdc_read_packet()
122 t[k] = gameport_time(gameport, TMDC_MAX_START); in tmdc_read_packet()
123 i[k] = j[k] = 0; in tmdc_read_packet()
136 for (k = 0, v = w, u = x; k < 2; k++, v >>= 2, u >>= 2) { in tmdc_read_packet()
138 if (t[k] <= 0 || i[k] >= TMDC_MAX_LENGTH) continue; in tmdc_read_packet()
139 t[k] = p; in tmdc_read_packet()
140 if (j[k] == 0) { /* Start bit */ in tmdc_read_packet()
141 if (~v & 1) t[k] = 0; in tmdc_read_packet()
142 data[k][i[k]] = 0; j[k]++; continue; in tmdc_read_packet()
144 if (j[k] == 9) { /* Stop bit */ in tmdc_read_packet()
145 if (v & 1) t[k] = 0; in tmdc_read_packet()
146 j[k] = 0; i[k]++; continue; in tmdc_read_packet()
148 data[k][i[k]] |= (~v & 1) << (j[k]++ - 1); /* Data bit */ in tmdc_read_packet()
150 t[k]--; in tmdc_read_packet()
169 int i, j, k, l; in tmdc_timer() local
209 for (k = l = 0; k < 4; k++) { in tmdc_timer()
210 for (i = 0; i < tmdc->btnc[j][k]; i++) in tmdc_timer()
212 ((data[j][tmdc_byte_d[k]] >> (i + tmdc->btno[j][k])) & 1)); in tmdc_timer()
213 l += tmdc->btnc[j][k]; in tmdc_timer()
261 int i, j, k, l, m; in tmdc_connect() local
292 for (k = 0; k < 4; k++) in tmdc_connect()
293 models[m].btnc[k] = k < (data[j][TMDC_BYTE_DEF] & 0xf) ? 8 : 0; in tmdc_connect()
297 for (k = 0; k < 4; k++) { in tmdc_connect()
298 tmdc->btnc[j][k] = models[m].btnc[k]; in tmdc_connect()
299 tmdc->btno[j][k] = models[m].btno[k]; in tmdc_connect()
332 for (k = l = 0; k < 4; k++) { in tmdc_connect()
333 for (i = 0; i < models[m].btnc[k] && i < TMDC_BTN; i++) in tmdc_connect()
335 l += models[m].btnc[k]; in tmdc_connect()