mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 10:45:22 +00:00
stm32f051 I2C slave does not clear transmit interrupt status (TXIS) on receiving NACK. That fails to support I2C master repeated-start read. This change moves slave transmit from host command thread's TXIS loop to interrupt event loop. And enables NACK interrupt to handle master restart. On the I2C master side, this CL adds i2c_xfer flags. With this CL, stm32f0 EC can talk to stm32f051 PD through host commands. BRANCH=None BUG=None TEST=make BOARD=<board with stm32f0 EC and PD> Verify EC console command "pdcmd 1 0 0x10 0x20 0x30 0x40" Change-Id: I771b4fb3de3732f18da90ea5e27a79afb09689b0 Signed-off-by: Rong Chang <rongchang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/267041 Reviewed-by: Alec Berg <alecaberg@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Trybot-Ready: Vincent Palatin <vpalatin@chromium.org>