summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chip/stm32/i2c-stm32f0.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/chip/stm32/i2c-stm32f0.c b/chip/stm32/i2c-stm32f0.c
index 1a289393d4..11dd4c7ba4 100644
--- a/chip/stm32/i2c-stm32f0.c
+++ b/chip/stm32/i2c-stm32f0.c
@@ -153,6 +153,14 @@ static void i2c_send_response_packet(struct host_packet *pkt)
/* I2C is slow, so let other things run while we wait */
usleep(50);
}
+
+ /*
+ * If an error occurred. Set the transmitter not full so as to keep
+ * sending '0xec' in the event loop. That way the master doesn't have
+ * to snoop the response stream.
+ */
+ if (pkt->driver_result != EC_RES_SUCCESS)
+ STM32_I2C_CR1(host_i2c_resp_port) |= STM32_I2C_CR1_TXIE;
}
/* Process the command in the i2c host buffer */