From: smckown Date: Fri, 8 May 2009 22:27:17 +0000 (+0000) Subject: Slightly better implementation of SpiPacket.send. X-Git-Tag: release/2.1.0-1~2 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=90538ef8f7b5039e7cfb563f0b8a02d4c75153d5 Slightly better implementation of SpiPacket.send. --- diff --git a/tos/chips/msp430/usci/Msp430SpiP.nc b/tos/chips/msp430/usci/Msp430SpiP.nc index b040053a..69fca5a5 100644 --- a/tos/chips/msp430/usci/Msp430SpiP.nc +++ b/tos/chips/msp430/usci/Msp430SpiP.nc @@ -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;