]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/usci/Msp430SpiP.nc
Slightly better implementation of SpiPacket.send.
[tinyos-2.x.git] / 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;