From 90538ef8f7b5039e7cfb563f0b8a02d4c75153d5 Mon Sep 17 00:00:00 2001 From: smckown Date: Fri, 8 May 2009 22:27:17 +0000 Subject: [PATCH] Slightly better implementation of SpiPacket.send. --- tos/chips/msp430/usci/Msp430SpiP.nc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.39.2