Lines Matching refs:timeout_ref
266 uint8_t awaited_value, uint64_t timeout_ref) in i2c_wait_flag() argument
275 if (timeout_elapsed(timeout_ref)) { in i2c_wait_flag()
292 static int i2c_ack_failed(struct i2c_handle_s *hi2c, uint64_t timeout_ref) in i2c_ack_failed() argument
304 if (timeout_elapsed(timeout_ref)) { in i2c_ack_failed()
337 static int i2c_wait_txis(struct i2c_handle_s *hi2c, uint64_t timeout_ref) in i2c_wait_txis() argument
341 if (i2c_ack_failed(hi2c, timeout_ref) != 0) { in i2c_wait_txis()
345 if (timeout_elapsed(timeout_ref)) { in i2c_wait_txis()
364 static int i2c_wait_stop(struct i2c_handle_s *hi2c, uint64_t timeout_ref) in i2c_wait_stop() argument
368 if (i2c_ack_failed(hi2c, timeout_ref) != 0) { in i2c_wait_stop()
372 if (timeout_elapsed(timeout_ref)) { in i2c_wait_stop()
434 uint16_t mem_add_size, uint64_t timeout_ref) in i2c_request_memory_write() argument
439 if (i2c_wait_txis(hi2c, timeout_ref) != 0) { in i2c_request_memory_write()
452 if (i2c_wait_txis(hi2c, timeout_ref) != 0) { in i2c_request_memory_write()
461 if (i2c_wait_flag(hi2c, I2C_FLAG_TCR, 0, timeout_ref) != 0) { in i2c_request_memory_write()
481 uint64_t timeout_ref) in i2c_request_memory_read() argument
486 if (i2c_wait_txis(hi2c, timeout_ref) != 0) { in i2c_request_memory_read()
499 if (i2c_wait_txis(hi2c, timeout_ref) != 0) { in i2c_request_memory_read()
508 if (i2c_wait_flag(hi2c, I2C_FLAG_TC, 0, timeout_ref) != 0) { in i2c_request_memory_read()
533 uint64_t timeout_ref; in i2c_write() local
555 timeout_ref = timeout_init_us(I2C_TIMEOUT_BUSY_MS * 1000); in i2c_write()
556 if (i2c_wait_flag(hi2c, I2C_FLAG_BUSY, 1, timeout_ref) != 0) { in i2c_write()
564 timeout_ref = timeout_init_us(timeout_ms * 1000); in i2c_write()
569 mem_add_size, timeout_ref) != 0) { in i2c_write()
598 if (i2c_wait_txis(hi2c, timeout_ref) != 0) { in i2c_write()
610 timeout_ref) != 0) { in i2c_write()
636 if (i2c_wait_stop(hi2c, timeout_ref) != 0) { in i2c_write()
714 uint64_t timeout_ref; in i2c_read() local
736 timeout_ref = timeout_init_us(I2C_TIMEOUT_BUSY_MS * 1000); in i2c_read()
737 if (i2c_wait_flag(hi2c, I2C_FLAG_BUSY, 1, timeout_ref) != 0) { in i2c_read()
748 mem_add_size, timeout_ref) != 0) { in i2c_read()
769 if (i2c_wait_flag(hi2c, I2C_FLAG_RXNE, 0, timeout_ref) != 0) { in i2c_read()
780 timeout_ref) != 0) { in i2c_read()
805 if (i2c_wait_stop(hi2c, timeout_ref) != 0) { in i2c_read()
899 uint64_t timeout_ref; in stm32_i2c_is_device_ready() local
920 timeout_ref = timeout_init_us(timeout_ms * 1000); in stm32_i2c_is_device_ready()
927 if (timeout_elapsed(timeout_ref)) { in stm32_i2c_is_device_ready()
936 timeout_ref) != 0) { in stm32_i2c_is_device_ready()
949 if (i2c_wait_flag(hi2c, I2C_FLAG_STOPF, 0, timeout_ref) != 0) { in stm32_i2c_is_device_ready()
962 timeout_ref) != 0) { in stm32_i2c_is_device_ready()