Lines Matching refs:msgs
37 struct i2c_msg *msgs, in i2c_nrfx_twim_transfer() argument
57 if (I2C_MSG_ADDR_10_BITS & msgs[i].flags) { in i2c_nrfx_twim_transfer()
62 bool dma_accessible = nrf_dma_accessible_check(&dev_config->twim, msgs[i].buf); in i2c_nrfx_twim_transfer()
71 && !(msgs[i].flags & I2C_MSG_STOP) in i2c_nrfx_twim_transfer()
72 && !(msgs[i + 1].flags & I2C_MSG_RESTART) in i2c_nrfx_twim_transfer()
73 && ((msgs[i].flags & I2C_MSG_READ) in i2c_nrfx_twim_transfer()
74 == (msgs[i + 1].flags & I2C_MSG_READ)); in i2c_nrfx_twim_transfer()
82 if ((msg_buf_used + msgs[i].len) > msg_buf_size) { in i2c_nrfx_twim_transfer()
90 msg_buf_used, msgs[i].len, in i2c_nrfx_twim_transfer()
95 if (!(msgs[i].flags & I2C_MSG_READ)) { in i2c_nrfx_twim_transfer()
97 msgs[i].buf, in i2c_nrfx_twim_transfer()
98 msgs[i].len); in i2c_nrfx_twim_transfer()
100 msg_buf_used += msgs[i].len; in i2c_nrfx_twim_transfer()
108 buf = msgs[i].buf; in i2c_nrfx_twim_transfer()
109 buf_len = msgs[i].len; in i2c_nrfx_twim_transfer()
114 ret = i2c_nrfx_twim_msg_transfer(dev, msgs[i].flags, buf, buf_len, addr); in i2c_nrfx_twim_transfer()
151 if ((msgs[i].flags & I2C_MSG_READ) && (buf == msg_buf)) { in i2c_nrfx_twim_transfer()
154 while (msg_buf_used >= msgs[j].len) { in i2c_nrfx_twim_transfer()
155 msg_buf_used -= msgs[j].len; in i2c_nrfx_twim_transfer()
156 memcpy(msgs[j].buf, in i2c_nrfx_twim_transfer()
158 msgs[j].len); in i2c_nrfx_twim_transfer()