Lines Matching refs:ircount
936 int ircount = 0; in mceusb_tx_ir() local
951 if (ircount % MCE_PACKET_SIZE == 0) { in mceusb_tx_ir()
953 if (ircount >= MCE_IRBUF_SIZE - 1) { in mceusb_tx_ir()
955 ret = mce_write(ir, irbuf, ircount); in mceusb_tx_ir()
958 ircount = 0; in mceusb_tx_ir()
960 irbuf[ircount++] = MCE_IRDATA_HEADER; in mceusb_tx_ir()
965 irbuf[ircount] = irsample; in mceusb_tx_ir()
968 irbuf[ircount] = MCE_MAX_PULSE_LENGTH; in mceusb_tx_ir()
975 irbuf[ircount] |= (i & 1 ? 0 : MCE_PULSE_BIT); in mceusb_tx_ir()
976 ircount++; in mceusb_tx_ir()
979 if (ircount >= MCE_IRBUF_SIZE) { in mceusb_tx_ir()
981 length = ircount % MCE_PACKET_SIZE; in mceusb_tx_ir()
983 irbuf[ircount - length] -= in mceusb_tx_ir()
986 ret = mce_write(ir, irbuf, ircount); in mceusb_tx_ir()
989 ircount = 0; in mceusb_tx_ir()
995 length = ircount % MCE_PACKET_SIZE; in mceusb_tx_ir()
997 irbuf[ircount - length] -= MCE_PACKET_SIZE - length; in mceusb_tx_ir()
1000 irbuf[ircount++] = MCE_IRDATA_TRAILER; in mceusb_tx_ir()
1003 ret = mce_write(ir, irbuf, ircount); in mceusb_tx_ir()