summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2014-08-12 22:46:17 -0500
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-08-14 15:29:31 +0000
commit0c635cc73e0926ff0c94d31c39e1b30da54bc8e9 (patch)
tree9a92a9b67dccddbb121c185850eacbc06b17bc56
parent116080b151b11e05cdd7f37027e61571268dbb2f (diff)
downloadchrome-ec-0c635cc73e0926ff0c94d31c39e1b30da54bc8e9.tar.gz
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 <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/212163 Reviewed-by: Alec Berg <alecaberg@chromium.org>
-rw-r--r--chip/stm32/i2c-stm32f0.c2
1 files changed, 1 insertions, 1 deletions
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 */