[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/cc1000_lpl
CC1000ActiveMessageP.nc, 1.5, 1.6
Kevin Klues
klueska at users.sourceforge.net
Fri Dec 7 16:32:48 PST 2007
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/cc1000_lpl
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv4892/cc1000_lpl
Modified Files:
CC1000ActiveMessageP.nc
Log Message:
Fix stupid crc bug
Index: CC1000ActiveMessageP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc1000_lpl/CC1000ActiveMessageP.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CC1000ActiveMessageP.nc 20 Jun 2007 23:49:02 -0000 1.5
--- CC1000ActiveMessageP.nc 8 Dec 2007 00:32:45 -0000 1.6
***************
*** 55,58 ****
--- 55,62 ----
return (cc1000_header_t*)(amsg->data - sizeof(cc1000_header_t));
}
+
+ cc1000_footer_t *getFooter(message_t *amsg) {
+ return (cc1000_footer_t *)(amsg->footer);
+ }
command error_t AMSend.send[am_id_t id](am_addr_t addr,
***************
*** 86,94 ****
event message_t* SubReceive.receive(message_t* msg, void* payload, uint8_t len) {
! if (call AMPacket.isForMe(msg)) {
! return signal Receive.receive[call AMPacket.type(msg)](msg, payload, len);
! }
! else {
! return signal Snoop.receive[call AMPacket.type(msg)](msg, payload, len);
}
}
--- 90,101 ----
event message_t* SubReceive.receive(message_t* msg, void* payload, uint8_t len) {
! cc1000_footer_t* msg_footer = getFooter(msg);
! if(msg_footer->crc == 1) {
! if (call AMPacket.isForMe(msg)) {
! return signal Receive.receive[call AMPacket.type(msg)](msg, payload, len);
! }
! else {
! return signal Snoop.receive[call AMPacket.type(msg)](msg, payload, len);
! }
}
}
More information about the Tinyos-2-commits
mailing list