Lines Matching refs:msgs
274 static int bq27z746_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, int num_msgs, in bq27z746_emul_transfer_i2c() argument
280 __ASSERT_NO_MSG(msgs && num_msgs); in bq27z746_emul_transfer_i2c()
282 i2c_dump_msgs_rw(target->dev, msgs, num_msgs, addr, false); in bq27z746_emul_transfer_i2c()
285 if (msgs->flags & I2C_MSG_READ) { in bq27z746_emul_transfer_i2c()
290 return emul_bq27z746_write(target, msgs->buf, msgs->len); in bq27z746_emul_transfer_i2c()
292 if (msgs->flags & I2C_MSG_READ) { in bq27z746_emul_transfer_i2c()
296 if (msgs->len != 1) { in bq27z746_emul_transfer_i2c()
297 LOG_ERR("Unexpected msg0 length %d", msgs->len); in bq27z746_emul_transfer_i2c()
300 reg = msgs->buf[0]; in bq27z746_emul_transfer_i2c()
303 msgs++; in bq27z746_emul_transfer_i2c()
304 if (msgs->flags & I2C_MSG_READ) { in bq27z746_emul_transfer_i2c()
305 rc = emul_bq27z746_read(target, reg, msgs->buf, msgs->len); in bq27z746_emul_transfer_i2c()