]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
TOS expects an enabled UART to have rx interrupt on by default.
authorR. Steve McKown <rsmckown@gmail.com>
Mon, 2 Aug 2010 20:26:48 +0000 (14:26 -0600)
committerR. Steve McKown <rsmckown@gmail.com>
Mon, 2 Aug 2010 23:58:05 +0000 (17:58 -0600)
In other words, one will receive UartStream.received() without first having to
call UartStream.enableReceiveInterrupt.

tos/chips/msp430/usci/Msp430UartP.nc

index a35dd92eb8d4b05a2296b1612ecde05f79d30b44..cb8073df7b84b48581696d3e1b6321530c5f1256 100644 (file)
@@ -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();
     }
   }