* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universität Berlin nor the names
+ * - Neither the name of the Titanium Mirror, Inc. nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
} 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();
*/
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))
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() {}
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() {}
}