[Tinyos-help] always confused by this segment of code

Tie Luo tieluo at gmail.com
Sat Nov 4 04:24:19 PST 2006


I have been confused for a long time. Can anybody help?

T2: CC2420TransmitP.nc  void attemptSend():

1    status = m_cca ? call STXONCCA.strobe() : call STXON.strobe();

2    if ( !( status & CC2420_STATUS_TX_ACTIVE ) ) {

3          status = call SNOP.strobe();

4         if ( status & CC2420_STATUS_TX_ACTIVE )    congestion = FALSE;
    }

My question is: Why read status twice?

I have read the datasheet, and it does not tell the reason.

Many thanks!

-- 
Regards,
Tie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20061104/7b8d947a/attachment-0001.html


More information about the Tinyos-help mailing list