Lines Matching +full:10 +full:bits
37 #define SW_END 8 /* Number of bits before end of packet to kick */
41 #define SW_LENGTH 512 /* Max number of bits in a packet */
76 { 10, 10, 9, 10, 1, 1 },
78 { 10, 10, 6, 7, 1, 1 },
79 { 10, 10, 6, 7, 1, 1 },
80 { 10, 10, 6, 1, 1 },
81 { 10, 7, 7, 1, 1 }};
103 int bits; member
191 * sw_get_bits() and GB() compose bits from the triplet buffer into a __u64.
193 * of bits to be read, 'shift' is offset in the resulting __u64 to start at, bits
194 * is number of bits per triplet.
197 #define GB(pos,num) sw_get_bits(buf, pos, num, sw->bits)
199 static __u64 sw_get_bits(unsigned char *buf, int pos, int num, char bits) in sw_get_bits() argument
202 int tri = pos % bits; /* Start position */ in sw_get_bits()
203 int i = pos / bits; in sw_get_bits()
208 if (tri == bits) { in sw_get_bits()
260 * sw_ccheck() checks synchronization bits and computes checksum of nibbles.
325 for (j = 0; j < 10; j++) in sw_parse()
340 input_report_abs(dev, ABS_X, GB( 9,10)); in sw_parse()
341 input_report_abs(dev, ABS_Y, GB(19,10)); in sw_parse()
361 input_report_abs(dev, ABS_X, GB( 0,10)); in sw_parse()
362 input_report_abs(dev, ABS_Y, GB(16,10)); in sw_parse()
369 input_report_key(dev, sw_btn[SW_ID_FSP][j], !GB(j+10,1)); in sw_parse()
386 input_report_abs(dev, ABS_RX, GB( 0,10)); in sw_parse()
387 input_report_abs(dev, ABS_RUDDER, GB(10, 6)); in sw_parse()
510 static void sw_print_packet(char *name, int length, unsigned char *buf, char bits) in sw_print_packet() argument
514 printk(KERN_INFO "sidewinder.c: %s packet, %d bits. [", name, length); in sw_print_packet()
516 printk("%x", (int)sw_get_bits(buf, i << 2, 4, bits)); in sw_print_packet()
547 * sw_guess_mode() checks the upper two button bits for toggling -
644 if (i > l) { /* Longer? As we can only lose bits, it makes */ in sw_connect()
651 sw->bits = m; in sw_connect()
686 sw->bits = 3; in sw_connect()
722 int bits, code; in sw_connect() local
750 for (j = 0; (bits = sw_bit[sw->type][j]); j++) { in sw_connect()
754 min = bits == 1 ? -1 : 0; in sw_connect()
755 max = (1 << bits) - 1; in sw_connect()
756 fuzz = (bits >> 1) >= 2 ? 1 << ((bits >> 1) - 2) : 0; in sw_connect()
757 flat = code == ABS_THROTTLE || bits < 5 ? in sw_connect()
758 0 : 1 << (bits - 5); in sw_connect()