]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Slightly better implementation of SpiPacket.send.
authorsmckown <smckown@4bc1554a-c7f2-4f65-a403-e0be01f0239c>
Fri, 8 May 2009 22:27:17 +0000 (22:27 +0000)
committerR. Steve McKown <rsmckown@gmail.com>
Tue, 1 Dec 2009 03:01:32 +0000 (20:01 -0700)
tos/chips/msp430/usci/Msp430SpiP.nc

index b040053a252738a6eead2df2af4a9aaace7a1bbe..69fca5a5702e3526416fdd1d20bd78db33b43e66 100644 (file)
@@ -241,7 +241,7 @@ implementation {
     }
   }
 
-  /* Return FALSE if we are in reset, so callers can clean up as appropriate. */
+  /* If we are a slave, return FALSE if the master has unasserted CSn. */
   bool sendData()
   {
     atomic {
@@ -277,6 +277,9 @@ implementation {
        if (sendData()) {
          call Registers.setIeRx();
          return SUCCESS;
+       } else if (m_pos) {
+         post signalSendDone();
+         return SUCCESS;
        } else {
          m_len = 0;
          return FAIL;