[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/cc2420/receive
CC2420ReceiveC.nc, 1.1, 1.2 CC2420ReceiveP.nc, 1.1, 1.2
dmm
rincon at users.sourceforge.net
Fri Jul 6 11:09:46 PDT 2007
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/receive
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27278/receive
Modified Files:
CC2420ReceiveC.nc CC2420ReceiveP.nc
Log Message:
Updated the HTML regression test report, named it something more date-neutral. Updated CC2420Config to provide async commands so CC2420Receive can use them to perform software address checking.
Index: CC2420ReceiveC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/receive/CC2420ReceiveC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CC2420ReceiveC.nc 4 Jul 2007 00:37:15 -0000 1.1
--- CC2420ReceiveC.nc 6 Jul 2007 18:09:44 -0000 1.2
***************
*** 50,54 ****
components CC2420ReceiveP;
components CC2420PacketC;
- components ActiveMessageAddressC;
components new CC2420SpiC() as Spi;
components CC2420ControlC;
--- 50,53 ----
Index: CC2420ReceiveP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/receive/CC2420ReceiveP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CC2420ReceiveP.nc 4 Jul 2007 00:37:16 -0000 1.1
--- CC2420ReceiveP.nc 6 Jul 2007 18:09:44 -0000 1.2
***************
*** 74,78 ****
RXFIFO_SIZE = 128,
TIMESTAMP_QUEUE_SIZE = 8,
! FCF_LENGTH = 2,
};
--- 74,78 ----
RXFIFO_SIZE = 128,
TIMESTAMP_QUEUE_SIZE = 8,
! SACK_HEADER_LENGTH = 7,
};
***************
*** 125,130 ****
return SUCCESS;
}
-
-
command error_t StdControl.stop() {
--- 125,128 ----
***************
*** 225,231 ****
if(rxFrameLength <= MAC_PACKET_SIZE) {
if(rxFrameLength > 0) {
! if(rxFrameLength > FCF_LENGTH) {
// This packet has an FCF byte plus at least one more byte to read
! call RXFIFO.continueRead(buf + 1, FCF_LENGTH);
} else {
--- 223,229 ----
if(rxFrameLength <= MAC_PACKET_SIZE) {
if(rxFrameLength > 0) {
! if(rxFrameLength > SACK_HEADER_LENGTH) {
// This packet has an FCF byte plus at least one more byte to read
! call RXFIFO.continueRead(buf + 1, SACK_HEADER_LENGTH);
} else {
***************
*** 252,257 ****
--- 250,266 ----
case S_RX_FCF:
m_state = S_RX_PAYLOAD;
+
+ /*
+ * The destination address check here is not completely optimized. If you
+ * are seeing issues with dropped acknowledgements, try removing
+ * the address check and decreasing SACK_HEADER_LENGTH to 2.
+ * The length byte and the FCF byte are the only two bytes required
+ * to know that the packet is valid and requested an ack. The destination
+ * address is useful when we want to sniff packets from other transmitters
+ * while acknowledging packets that were destined for our local address.
+ */
if(call CC2420Config.isAutoAckEnabled() && !call CC2420Config.isHwAutoAckDefault()) {
if (((( header->fcf >> IEEE154_FCF_ACK_REQ ) & 0x01) == 1)
+ && (header->dest == call CC2420Config.getShortAddr())
&& ((( header->fcf >> IEEE154_FCF_FRAME_TYPE ) & 7) == IEEE154_TYPE_DATA)) {
// CSn flippage cuts off our FIFO; SACK and begin reading again
***************
*** 261,266 ****
call CSN.set();
call CSN.clr();
! call RXFIFO.beginRead(buf + 1 + FCF_LENGTH,
! rxFrameLength - FCF_LENGTH);
return;
}
--- 270,275 ----
call CSN.set();
call CSN.clr();
! call RXFIFO.beginRead(buf + 1 + SACK_HEADER_LENGTH,
! rxFrameLength - SACK_HEADER_LENGTH);
return;
}
***************
*** 268,273 ****
// Didn't flip CSn, we're ok to continue reading.
! call RXFIFO.continueRead(buf + 1 + FCF_LENGTH,
! rxFrameLength - FCF_LENGTH);
break;
--- 277,282 ----
// Didn't flip CSn, we're ok to continue reading.
! call RXFIFO.continueRead(buf + 1 + SACK_HEADER_LENGTH,
! rxFrameLength - SACK_HEADER_LENGTH);
break;
***************
*** 335,339 ****
waitForNextPacket();
}
!
/****************** CC2420Config Events ****************/
event void CC2420Config.syncDone( error_t error ) {
--- 344,348 ----
waitForNextPacket();
}
!
/****************** CC2420Config Events ****************/
event void CC2420Config.syncDone( error_t error ) {
More information about the Tinyos-2-commits
mailing list