From: R. Steve McKown Date: Mon, 2 Aug 2010 20:26:48 +0000 (-0600) Subject: TOS expects an enabled UART to have rx interrupt on by default. X-Git-Tag: release/2.1.1-4.4~14 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=7837df6e52e3cfedad2ea2d97711685682b28d63 TOS expects an enabled UART to have rx interrupt on by default. In other words, one will receive UartStream.received() without first having to call UartStream.enableReceiveInterrupt. --- diff --git a/tos/chips/msp430/usci/Msp430UartP.nc b/tos/chips/msp430/usci/Msp430UartP.nc index a35dd92e..cb8073df 100644 --- a/tos/chips/msp430/usci/Msp430UartP.nc +++ b/tos/chips/msp430/usci/Msp430UartP.nc @@ -114,6 +114,10 @@ implementation { /* Enable the device */ call Registers.clrCtl1(UCSWRST); + + /* TOS convention is for receive interrupts on by default. */ + call Registers.clrIfgRx(); + call Registers.setIeRx(); } }