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

John Regehr regehr at users.sourceforge.net
Mon Jun 2 21:43:05 PDT 2008


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/receive
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv26075/receive

Modified Files:
	CC2420ReceiveP.nc 
Log Message:
safe tinyos annotations

Index: CC2420ReceiveP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/receive/CC2420ReceiveP.nc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** CC2420ReceiveP.nc	16 May 2008 16:03:45 -0000	1.9
--- CC2420ReceiveP.nc	3 Jun 2008 04:43:03 -0000	1.10
***************
*** 98,102 ****
    norace uint8_t m_bytes_left;
    
!   norace message_t* m_p_rx_buf;
  
    message_t m_rx_buf;
--- 98,102 ----
    norace uint8_t m_bytes_left;
    
!   norace message_t* ONE_NOK m_p_rx_buf;
  
    message_t m_rx_buf;
***************
*** 196,200 ****
      cc2420_header_t* header = call CC2420PacketBody.getHeader( m_p_rx_buf );
      cc2420_metadata_t* metadata = call CC2420PacketBody.getMetadata( m_p_rx_buf );
!     uint8_t* buf = (uint8_t*) header;
      rxFrameLength = buf[ 0 ];
  
--- 196,201 ----
      cc2420_header_t* header = call CC2420PacketBody.getHeader( m_p_rx_buf );
      cc2420_metadata_t* metadata = call CC2420PacketBody.getMetadata( m_p_rx_buf );
!     uint8_t tmpLen = sizeof(message_t) - (offsetof(message_t, data) - sizeof(cc2420_header_t));
!     uint8_t* COUNT(tmpLen) buf = TCAST(uint8_t* COUNT(tmpLen), header);
      rxFrameLength = buf[ 0 ];
  
***************
*** 325,329 ****
    task void receiveDone_task() {
      cc2420_metadata_t* metadata = call CC2420PacketBody.getMetadata( m_p_rx_buf );
!     uint8_t* buf = (uint8_t*) call CC2420PacketBody.getHeader( m_p_rx_buf );;
      
      metadata->crc = buf[ rxFrameLength ] >> 7;
--- 326,332 ----
    task void receiveDone_task() {
      cc2420_metadata_t* metadata = call CC2420PacketBody.getMetadata( m_p_rx_buf );
!     cc2420_header_t* header = call CC2420PacketBody.getHeader( m_p_rx_buf);
!     uint8_t tmpLen = sizeof(message_t) - (offsetof(message_t, data) - sizeof(cc2420_header_t));
!     uint8_t* COUNT(tmpLen) buf = TCAST(uint8_t* COUNT(tmpLen), header);
      
      metadata->crc = buf[ rxFrameLength ] >> 7;



More information about the Tinyos-2-commits mailing list