Hi everyone,
CC2420TransmitP uses ChipSpiResource interface to keep hold of SPI bus when
it is expecting ACK. However, from the
code, ChipSpiResource.attemptRelease() is only called in signalDone():
* void signalDone( error_t err ) {*
* atomic m_state = S_STARTED;*
* abortSpiRelease = FALSE;*
* call ChipSpiResource.attemptRelease();*
* signal Send.sendDone( m_msg, err );*
* }*
abortSpiRelease is always FALSE when ChipSpiResource.attemptRelease() is
called, which in turn signals the following:
* async event void ChipSpiResource.releasing() {*
* if(abortSpiRelease) {*
* call ChipSpiResource.abortRelease();*
* }*
* }*
Because abortSpiRelease is FALSE, ChipSpiResource.abortRelease() is never
called.
The only place that abortSpiRelease is set TRUE is after the SFD is first
triggered:
* if ( (call CC2420PacketBody.getHeader( m_msg ))->fcf & ( 1 <<
IEEE154_FCF_ACK_REQ ) ) {*
* // This is an ack packet, don't release the chip's SPI bus lock.*
* abortSpiRelease = TRUE;*
* }*
* releaseSpiResource();*
Should *releaseSpiResource()* be replaced with *call
ChipSpiResource.abortRelease()* here? Any response is appreciated.
--
-Xiaohui Liu
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help