]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/usci/HplMsp430UsciInt0P.nc
Added SPI support. Now working using the loopback feature (UCLISTEN bit).
[tinyos-2.x.git] / tos / chips / msp430 / usci / HplMsp430UsciInt0P.nc
index 8c3a34510f789fed01a2a6095b996ccc6abc0eae..65ee5be1494f7c4a4e8269396197e2bd344d8a08 100644 (file)
@@ -75,16 +75,9 @@ implementation
        signal IntA.brk();
       } else
        signal IntA.rx(c);
-    } else if (READ_FLAG(UC0IFG, UCB0RXIFG)) {
-      volatile uint8_t c = UCB0RXBUF; /* read to clear UCB0RXIFG */
-      if (READ_FLAG(UCB0CTL1, UCBRK)) {
-       CLR_FLAG(UCB0CTL1, UCBRK);
-       if (READ_FLAG(UCB0CTL0, UCMODE_3) == UCMODE_3)
-         CLR_FLAG(UCB0CTL1, UCDORM);
-       signal IntB.brk();
-      } else
-       signal IntB.rx(c);
-    } else if (READ_FLAG(UCB0STAT, UCALIFG))
+    } else if (READ_FLAG(UC0IFG, UCB0RXIFG))
+      signal IntB.rx(UCB0RXBUF); /* read clears UCB0RXIFG */
+    else if (READ_FLAG(UCB0STAT, UCALIFG))
       signal IntB.i2cCal();
     else if (READ_FLAG(UCB0STAT, UCNACKIFG))
       signal IntB.i2cNak();