summaryrefslogtreecommitdiff
path: root/src/arch/msp430fr5969lp/driver/i2c.cc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-01-15 09:55:27 +0100
committerDaniel Friesel <derf@finalrewind.org>2018-01-15 09:55:27 +0100
commitc374e91391d3e58295375f439b15fe888bcdb3bd (patch)
treeecf514801caec0f99e835b869a9cfbd416108e21 /src/arch/msp430fr5969lp/driver/i2c.cc
parent8cdcdcf7572d08d5def7fddc7a9438826eeed22b (diff)
msp430 i2c: clear TXIFG after sending the last byte
Diffstat (limited to 'src/arch/msp430fr5969lp/driver/i2c.cc')
-rw-r--r--src/arch/msp430fr5969lp/driver/i2c.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/arch/msp430fr5969lp/driver/i2c.cc b/src/arch/msp430fr5969lp/driver/i2c.cc
index 80f33b0..5f1f4c1 100644
--- a/src/arch/msp430fr5969lp/driver/i2c.cc
+++ b/src/arch/msp430fr5969lp/driver/i2c.cc
@@ -57,6 +57,7 @@ signed char I2C::xmit(unsigned char address,
UCB0TXBUF = tx_buf[i];
}
while (!(UCB0IFG & (UCTXIFG0 | UCNACKIFG | UCCLTOIFG)));
+ UCB0IFG &= ~(UCTXIFG0 | UCNACKIFG);
//if (UCB0IFG & (UCNACKIFG | UCCLTOIFG)) {
// UCB0IFG &= ~UCNACKIFG;
// UCB0IFG &= ~UCCLTOIFG;