[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/cc2420/receive CC2420ReceiveP.nc, 1.17, 1.18

kusy kusy at users.sourceforge.net
Thu Feb 5 22:38:51 PST 2009


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/receive
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv311/receive

Modified Files:
	CC2420ReceiveP.nc 
Log Message:
committing new timestamping code

Index: CC2420ReceiveP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/receive/CC2420ReceiveP.nc,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** CC2420ReceiveP.nc	1 Dec 2008 23:51:38 -0000	1.17
--- CC2420ReceiveP.nc	6 Feb 2009 06:38:49 -0000	1.18
***************
*** 286,299 ****
        }
        
!       if ( m_timestamp_size ) {
!         if ( rxFrameLength > 10 ) {
!           call PacketTimeStamp.set(m_p_rx_buf, m_timestamp_queue[ m_timestamp_head ]);
            m_timestamp_head = ( m_timestamp_head + 1 ) % TIMESTAMP_QUEUE_SIZE;
            m_timestamp_size--;
!         }
!       } else {
!         call PacketTimeStamp.clear(m_p_rx_buf);
        }
!       
        // We may have received an ack that should be processed by Transmit
        // buf[rxFrameLength] >> 7 checks the CRC
--- 286,308 ----
        }
        
!       //new packet is buffered up, or we don't have timestamp in fifo, or ack
!       if ( ( m_missed_packets && call FIFO.get() ) || !call FIFOP.get()
!             || !m_timestamp_size
!             || rxFrameLength <= 10) {
!         call PacketTimeStamp.clear(m_p_rx_buf);
!       }
!       else {
!           if (m_timestamp_size==1)
!             call PacketTimeStamp.set(m_p_rx_buf, m_timestamp_queue[ m_timestamp_head ]);
            m_timestamp_head = ( m_timestamp_head + 1 ) % TIMESTAMP_QUEUE_SIZE;
            m_timestamp_size--;
! 
!           if (m_timestamp_size>0) {
!             call PacketTimeStamp.clear(m_p_rx_buf);
!             m_timestamp_head = 0;
!             m_timestamp_size = 0;
!           }
        }
! 
        // We may have received an ack that should be processed by Transmit
        // buf[rxFrameLength] >> 7 checks the CRC



More information about the Tinyos-2-commits mailing list