From 0c635cc73e0926ff0c94d31c39e1b30da54bc8e9 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 12 Aug 2014 22:46:17 -0500 Subject: [PATCH] stm32f0: use proper bit checking I2C ISR transmitter empty status The wrong define was being used when checking the I2C ISR status. The wrong define just so happened to be the correct bit. BUG=chrome-os-partner:30784 BRANCH=None TEST=Built and ran on ryu. Change-Id: I6c7aad34f5e7c7ace4db4442147023346b6285bc Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/212163 Reviewed-by: Alec Berg --- chip/stm32/i2c-stm32f0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chip/stm32/i2c-stm32f0.c b/chip/stm32/i2c-stm32f0.c index 418e481cc4..b3508ead1b 100644 --- a/chip/stm32/i2c-stm32f0.c +++ b/chip/stm32/i2c-stm32f0.c @@ -147,7 +147,7 @@ static void i2c_send_response_packet(struct host_packet *pkt) /* Transmit data when I2C tx buffer is empty until finished. */ while ((i < size + 2) && tx_pending) { - if (STM32_I2C_ISR(host_i2c_resp_port) & STM32_I2C_CR1_TXIE) + if (STM32_I2C_ISR(host_i2c_resp_port) & STM32_I2C_ISR_TXIS) STM32_I2C_TXDR(host_i2c_resp_port) = host_buffer[i++]; /* I2C is slow, so let other things run while we wait */