ths8200_read
ths8200_write(sd, reg, (ths8200_read(sd, reg) & clr_mask) | val_mask);
reg->val = ths8200_read(sd, reg->reg & 0xff);
uint8_t reg_03 = ths8200_read(sd, THS8200_CHIP_CTL);
ths8200_read(sd, THS8200_DTG2_PIXEL_CNT_MSB) * 256 +
ths8200_read(sd, THS8200_DTG2_PIXEL_CNT_LSB),
(ths8200_read(sd, THS8200_DTG2_LINE_CNT_MSB) & 0x07) * 256 +
ths8200_read(sd, THS8200_DTG2_LINE_CNT_LSB));
state->chip_version = ths8200_read(sd, THS8200_VERSION);