Lines Matching refs:msgs
55 static int at24_emul_transfer(const struct emul *target, struct i2c_msg *msgs, in at24_emul_transfer() argument
84 i2c_dump_msgs_rw(target->dev, msgs, num_msgs, addr, false); in at24_emul_transfer()
87 if (msgs->flags & I2C_MSG_READ) { in at24_emul_transfer()
91 data->cur_reg = msgs->buf[0]; in at24_emul_transfer()
92 len = MIN(msgs->len - 1, cfg->size - data->cur_reg); in at24_emul_transfer()
93 memcpy(&cfg->buf[data->cur_reg], &msgs->buf[1], len); in at24_emul_transfer()
96 if (msgs->flags & I2C_MSG_READ) { in at24_emul_transfer()
100 data->cur_reg = msgs->buf[0]; in at24_emul_transfer()
103 msgs++; in at24_emul_transfer()
104 if (!(msgs->flags & I2C_MSG_READ)) { in at24_emul_transfer()
115 len = MIN(msgs->len, cfg->size - data->cur_reg); in at24_emul_transfer()
116 memcpy(msgs->buf, &cfg->buf[data->cur_reg], len); in at24_emul_transfer()