[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/rf230 RF230LayerP.nc, 1.7, 1.8
Miklos Maroti
mmaroti at users.sourceforge.net
Wed May 7 13:29:38 PDT 2008
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/rf230
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22224
Modified Files:
RF230LayerP.nc
Log Message:
add some debugging functionality
Index: RF230LayerP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/rf230/RF230LayerP.nc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** RF230LayerP.nc 30 Apr 2008 17:01:31 -0000 1.7
--- RF230LayerP.nc 7 May 2008 20:29:36 -0000 1.8
***************
*** 473,494 ****
if( (length & RF230_TRX_STATUS_MASK) != RF230_BUSY_TX )
{
- #ifdef RF230_DEBUG
- if( call DiagMsg.record() )
- {
- call DiagMsg.str("assert tx");
- call DiagMsg.uint16(call RadioAlarm.getNow());
- call DiagMsg.hex8(readRegister(RF230_TRX_STATUS));
- call DiagMsg.hex8(readRegister(RF230_TRX_STATE));
- call DiagMsg.hex8(radioIrq);
- call DiagMsg.uint8(state);
- call DiagMsg.uint8(cmd);
- call DiagMsg.send();
- }
- #endif
ASSERT( (length & RF230_TRX_STATUS_MASK) == RF230_PLL_ON );
return FAIL;
}
! call PacketTimeStamp.set(msg, time);
// wait for the TRX_END interrupt
--- 473,492 ----
if( (length & RF230_TRX_STATUS_MASK) != RF230_BUSY_TX )
{
ASSERT( (length & RF230_TRX_STATUS_MASK) == RF230_PLL_ON );
+
+ call PacketTimeStamp.clear(msg);
return FAIL;
}
! #ifdef RF230_DEBUG_MESSAGES
! if( call DiagMsg.record() )
! {
! call DiagMsg.str("tx");
! call DiagMsg.uint16(time);
! call DiagMsg.uint8(length);
! call DiagMsg.hex8s(data, length - 2);
! call DiagMsg.send();
! }
! #endif
// wait for the TRX_END interrupt
***************
*** 500,503 ****
--- 498,502 ----
default tasklet_async event void RadioSend.sendDone(error_t error) { }
+ default tasklet_async event void RadioSend.ready() { }
/*----------------- CCA -----------------*/
***************
*** 579,582 ****
--- 578,596 ----
call SELN.set();
state = STATE_RX_ON;
+
+ #ifdef RF230_DEBUG_MESSAGES
+ if( call DiagMsg.record() )
+ {
+ length = call RF230Config.getLength(rxMsg);
+ call DiagMsg.str("rx");
+ call DiagMsg.uint16(call PacketTimeStamp.isSet(rxMsg) ? call PacketTimeStamp.get(rxMsg) : 0);
+ call DiagMsg.uint16(call RadioAlarm.getNow());
+ call DiagMsg.uint8(length);
+ call DiagMsg.uint8(crc != 0);
+ call DiagMsg.hex8s(call RF230Config.getPayload(rxMsg), length - 2);
+ call DiagMsg.send();
+ }
+ #endif
+
cmd = CMD_NONE;
More information about the Tinyos-2-commits
mailing list