X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fmsp430%2Fusci%2FHplMsp430UsciInt1P.nc;fp=tos%2Fchips%2Fmsp430%2Fusci%2FHplMsp430UsciInt1P.nc;h=1e18eb70bf9605c83845b19f4e219bb2a557b63b;hb=c62b18891808f1958e9e04708f91c5ea6fb2c765;hp=720031034ccd8dc9858527c5f8206cdaf4cac6f4;hpb=d4339168075e5b8367972937a71f9665ff3cc4f0;p=tinyos-2.x.git diff --git a/tos/chips/msp430/usci/HplMsp430UsciInt1P.nc b/tos/chips/msp430/usci/HplMsp430UsciInt1P.nc index 72003103..1e18eb70 100644 --- a/tos/chips/msp430/usci/HplMsp430UsciInt1P.nc +++ b/tos/chips/msp430/usci/HplMsp430UsciInt1P.nc @@ -84,7 +84,7 @@ implementation } else if (READ_FLAG(UCB1STAT, UCNACKIFG)) { CLR_FLAG(UCB1STAT, UCNACKIFG); CLR_FLAG(UC1IFG, UCB1TXIFG); /* Errata USCI25; 'reset' means clear? */ - signal IntB.i2cNak(); + signal IntB.i2cNack(); } else if (READ_FLAG(UCB1STAT, UCSTTIFG)) { CLR_FLAG(UCB1STAT, UCSTTIFG); signal IntB.i2cStart(); @@ -100,7 +100,11 @@ implementation */ TOSH_SIGNAL(USCIAB1TX_VECTOR) { if (READ_FLAG(UC1IFG & UC1IE, UCB1RXIE)) - signal IntB.rx(UCB1RXBUF); /* I2C receive */ + /* I2C receive. Do not read UCB1RXBUF here, as the code receiving + * IntB.rx() may first need to set stop and/or start bits. The receiver + * must read UCB1RXBUF. + */ + signal IntB.rx(0); else if (READ_FLAG(UC1IFG & UC1IE, UCA1TXIFG)) signal IntA.tx(); else if (READ_FLAG(UC1IFG & UC1IE, UCB1TXIFG)) @@ -112,7 +116,7 @@ implementation default async event void IntA.tx() {} /* i2c is not available for A devices, so the below are never signalled */ default async event void IntA.i2cCal() {} - default async event void IntA.i2cNak() {} + default async event void IntA.i2cNack() {} default async event void IntA.i2cStart() {} default async event void IntA.i2cStop() {} @@ -121,7 +125,7 @@ implementation default async event void IntB.rx(uint8_t byte) {} default async event void IntB.tx() {} default async event void IntB.i2cCal() {} - default async event void IntB.i2cNak() {} + default async event void IntB.i2cNack() {} default async event void IntB.i2cStart() {} default async event void IntB.i2cStop() {} }