diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-01-15 09:55:27 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-01-15 09:55:27 +0100 |
commit | c374e91391d3e58295375f439b15fe888bcdb3bd (patch) | |
tree | ecf514801caec0f99e835b869a9cfbd416108e21 | |
parent | 8cdcdcf7572d08d5def7fddc7a9438826eeed22b (diff) |
msp430 i2c: clear TXIFG after sending the last byte
-rw-r--r-- | src/arch/msp430fr5969lp/driver/i2c.cc | 1 |
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; |