Lines Matching refs:td
247 static void Hi35xxI2cSetAddr(const struct Hi35xxI2cCntlr *hi35xx, const struct Hi35xxTransferData *td)
249 struct I2cMsg *msg = &td->msgs[td->index];
277 static void Hi35xxI2cCfgCmd(const struct Hi35xxI2cCntlr *hi35xx, const struct Hi35xxTransferData *td)
280 struct I2cMsg *msg = &td->msgs[td->index];
282 Hi35xxI2cCmdregSet(hi35xx, (td->index == 0) ? CMD_TX_S : CMD_TX_RS, &offset);
286 if (td->index == 0) {
314 if ((td->index == (td->count - 1)) || (msg->flags & I2C_FLAG_STOP)) {
316 td->index, td->count, msg->flags);
474 static int32_t Hi35xxI2cXferOneMsgPolling(const struct Hi35xxI2cCntlr *hi35xx, const struct Hi35xxTransferData *td)
479 struct I2cMsg *msg = &td->msgs[td->index];
486 Hi35xxI2cSetAddr(hi35xx, td);
487 Hi35xxI2cCfgCmd(hi35xx, td);
542 struct Hi35xxTransferData td;
554 td.msgs = msgs;
555 td.count = count;
556 td.index = 0;
558 while (td.index < td.count) {
559 ret = Hi35xxI2cXferOneMsgPolling(hi35xx, &td);
563 td.index++;
565 return (td.index > 0) ? td.index : ret;