]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Some comments about the UART ISRs.
authorR. Steve McKown <rsmckown@gmail.com>
Thu, 8 Apr 2010 00:46:48 +0000 (18:46 -0600)
committerR. Steve McKown <rsmckown@gmail.com>
Tue, 13 Apr 2010 20:18:27 +0000 (14:18 -0600)
tos/chips/msp430/usci/Msp430UartP.nc

index 742c167470cd62d73fda661f01ead91cf509c93a..6f6384db9618ffef37ebbdfd2a91fa0c6860e702 100644 (file)
@@ -163,6 +163,9 @@ implementation {
 
   async event void Interrupts.tx()
   {
+    /* FIXME: this can cause an arbitrarily long ISR, if m_slen is large.
+     * But depending on timing, we may always only write 1 byte.
+     */
     while (m_slen && call Registers.getIfgTx()) {
       call Registers.setTxbuf(*m_sbuf);
       if (--m_slen)
@@ -238,6 +241,9 @@ implementation {
   {
     if (m_robuf) {
       /* receive() takes precedence if active */
+      /* FIXME: an arbitrarily long ISR may occur if m_rlen is large.
+       * But depending on timing, we may always only read 1 byte.
+       */
       while (m_rlen && call Registers.getIfgRx()) {
        *m_rbuf = byte;
        if (--m_rlen)