Lines Matching refs:current

161 	data->current.len = msg->len;  in msg_init()
162 data->current.buf = msg->buf; in msg_init()
163 data->current.flags = msg->flags; in msg_init()
164 data->current.is_restart = 0U; in msg_init()
165 data->current.is_write = (transfer == I2C_REQUEST_WRITE); in msg_init()
166 data->current.is_arlo = 0U; in msg_init()
167 data->current.is_err = 0U; in msg_init()
168 data->current.is_nack = 0U; in msg_init()
169 data->current.msg = msg; in msg_init()
189 if (data->current.is_nack || data->current.is_err || in msg_end()
190 data->current.is_arlo) { in msg_end()
201 if (data->current.is_arlo) { in msg_end()
203 data->current.is_arlo); in msg_end()
204 data->current.is_arlo = 0U; in msg_end()
207 if (data->current.is_nack) { in msg_end()
209 data->current.is_nack = 0U; in msg_end()
212 if (data->current.is_err) { in msg_end()
214 data->current.is_err); in msg_end()
215 data->current.is_err = 0U; in msg_end()
244 if (data->current.is_restart == 0U) { in handle_sb()
245 data->current.is_restart = 1U; in handle_sb()
248 data->current.is_restart = 0U; in handle_sb()
255 if (data->current.is_write) { in handle_sb()
259 if (data->current.len == 2) { in handle_sb()
272 if (!data->current.is_write && data->current.is_restart) { in handle_addr()
273 data->current.is_restart = 0U; in handle_addr()
281 if (data->current.is_write) { in handle_addr()
289 if (data->current.len == 0U && IS_ENABLED(CONFIG_SOC_SERIES_STM32F1X)) { in handle_addr()
291 } else if (data->current.len == 1U) { in handle_addr()
298 } else if (data->current.len == 2U) { in handle_addr()
315 if (data->current.len) { in handle_txe()
316 data->current.len--; in handle_txe()
317 if (data->current.len == 0U) { in handle_txe()
324 LL_I2C_TransmitData8(i2c, *data->current.buf); in handle_txe()
325 data->current.buf++; in handle_txe()
327 if (data->current.flags & I2C_MSG_STOP) { in handle_txe()
345 if (data->current.len > 0) { in handle_rxne()
346 switch (data->current.len) { in handle_rxne()
351 if (data->current.flags & I2C_MSG_STOP) { in handle_rxne()
355 data->current.len--; in handle_rxne()
356 *data->current.buf = LL_I2C_ReceiveData8(i2c); in handle_rxne()
357 data->current.buf++; in handle_rxne()
367 if (data->current.msg->len > 2) { in handle_rxne()
382 data->current.len--; in handle_rxne()
383 *data->current.buf = LL_I2C_ReceiveData8(i2c); in handle_rxne()
384 data->current.buf++; in handle_rxne()
388 if (data->current.flags & I2C_MSG_STOP) { in handle_rxne()
401 if (data->current.is_write) { in handle_btf()
406 switch (data->current.len) { in handle_btf()
412 if (data->current.flags & I2C_MSG_STOP) { in handle_btf()
417 data->current.len--; in handle_btf()
418 *data->current.buf = LL_I2C_ReceiveData8(i2c); in handle_btf()
419 data->current.buf++; in handle_btf()
426 data->current.len--; in handle_btf()
427 *data->current.buf = LL_I2C_ReceiveData8(i2c); in handle_btf()
428 data->current.buf++; in handle_btf()
589 } else if (LL_I2C_IsActiveFlag_TXE(i2c) && data->current.is_write) { in stm32_i2c_event_isr()
591 } else if (LL_I2C_IsActiveFlag_RXNE(i2c) && !data->current.is_write) { in stm32_i2c_event_isr()
613 data->current.is_nack = 1U; in stm32_i2c_error_isr()
618 data->current.is_arlo = 1U; in stm32_i2c_error_isr()
624 data->current.is_err = 1U; in stm32_i2c_error_isr()
694 data->current.is_nack = 1U; in check_errors()
701 data->current.is_arlo = 1U; in check_errors()
708 data->current.is_err = 1U; in check_errors()
715 data->current.is_err = 1U; in check_errors()
753 data->current.is_err = 1U; in stm32_i2c_msg_write()
767 data->current.is_err = 1U; in stm32_i2c_msg_write()
785 data->current.is_nack = 1U; in stm32_i2c_msg_write()
801 data->current.is_nack = 1U; in stm32_i2c_msg_write()
814 data->current.is_err = 1U; in stm32_i2c_msg_write()
851 data->current.is_err = 1U; in stm32_i2c_msg_read()
865 data->current.is_err = 1U; in stm32_i2c_msg_read()
876 data->current.is_err = 1U; in stm32_i2c_msg_read()
887 data->current.is_err = 1U; in stm32_i2c_msg_read()
905 data->current.is_nack = 1U; in stm32_i2c_msg_read()
928 data->current.is_err = 1U; in stm32_i2c_msg_read()
947 data->current.is_err = 1U; in stm32_i2c_msg_read()
971 data->current.is_err = 1U; in stm32_i2c_msg_read()