Lines Matching refs:msgs
51 static int f75303_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, in f75303_emul_transfer_i2c() argument
58 __ASSERT_NO_MSG(msgs && num_msgs); in f75303_emul_transfer_i2c()
60 i2c_dump_msgs_rw(target->dev, msgs, num_msgs, addr, false); in f75303_emul_transfer_i2c()
63 if (msgs->flags & I2C_MSG_READ) { in f75303_emul_transfer_i2c()
67 if (msgs->len != 1) { in f75303_emul_transfer_i2c()
68 LOG_ERR("Unexpected msg0 length %d", msgs->len); in f75303_emul_transfer_i2c()
71 reg = msgs->buf[0]; in f75303_emul_transfer_i2c()
74 msgs++; in f75303_emul_transfer_i2c()
75 if (msgs->flags & I2C_MSG_READ) { in f75303_emul_transfer_i2c()
76 switch (msgs->len) { in f75303_emul_transfer_i2c()
79 msgs->buf[0] = val; in f75303_emul_transfer_i2c()
82 LOG_ERR("Unexpected msg1 length %d", msgs->len); in f75303_emul_transfer_i2c()
86 if (msgs->len != 1) { in f75303_emul_transfer_i2c()
87 LOG_ERR("Unexpected msg1 length %d", msgs->len); in f75303_emul_transfer_i2c()
89 f75303_emul_set_reg(target, reg, msgs->buf[0]); in f75303_emul_transfer_i2c()