Lines Matching refs:txsize
55 static int scd30_serdev_xfer(struct scd30_state *state, char *txbuf, int txsize, in scd30_serdev_xfer() argument
66 ret = serdev_device_write(serdev, txbuf, txsize, SCD30_SERDEV_TIMEOUT); in scd30_serdev_xfer()
69 if (ret != txsize) in scd30_serdev_xfer()
110 int ret, rxsize, txsize = 2; in scd30_serdev_command() local
114 put_unaligned_be16(scd30_serdev_cmd_lookup_tbl[cmd], txbuf + txsize); in scd30_serdev_command()
115 txsize += 2; in scd30_serdev_command()
121 put_unaligned_be16(size / 2, txbuf + txsize); in scd30_serdev_command()
123 put_unaligned_be16(0x0001, txbuf + txsize); in scd30_serdev_command()
124 txsize += 2; in scd30_serdev_command()
125 crc = scd30_serdev_calc_crc(txbuf, txsize); in scd30_serdev_command()
126 put_unaligned_le16(crc, txbuf + txsize); in scd30_serdev_command()
127 txsize += 2; in scd30_serdev_command()
134 put_unaligned_be16(arg, txbuf + txsize); in scd30_serdev_command()
135 txsize += 2; in scd30_serdev_command()
136 crc = scd30_serdev_calc_crc(txbuf, txsize); in scd30_serdev_command()
137 put_unaligned_le16(crc, txbuf + txsize); in scd30_serdev_command()
138 txsize += 2; in scd30_serdev_command()
139 rxsize = txsize; in scd30_serdev_command()
142 ret = scd30_serdev_xfer(state, txbuf, txsize, rxbuf, rxsize); in scd30_serdev_command()
148 if (memcmp(txbuf, rxbuf, txsize)) { in scd30_serdev_command()