[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/cc2420/control
CC2420ControlP.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/control
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27278/control
Modified Files:
CC2420ControlP.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: CC2420ControlP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/control/CC2420ControlP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CC2420ControlP.nc 4 Jul 2007 00:37:14 -0000 1.1
--- CC2420ControlP.nc 6 Jul 2007 18:09:44 -0000 1.2
***************
*** 100,103 ****
--- 100,105 ----
bool hwAutoAckDefault;
+ bool addressRecognition;
+
norace cc2420_control_state_t m_state = S_VREG_STOPPED;
***************
*** 134,137 ****
--- 136,145 ----
#endif
+ #if defined(CC2420_NO_ADDRESS_RECOGNITION)
+ addressRecognition = FALSE;
+ #else
+ addressRecognition = TRUE;
+ #endif
+
return SUCCESS;
}
***************
*** 254,258 ****
}
! command uint16_t CC2420Config.getShortAddr() {
atomic return m_short_addr;
}
--- 262,266 ----
}
! async command uint16_t CC2420Config.getShortAddr() {
atomic return m_short_addr;
}
***************
*** 262,267 ****
}
! command uint16_t CC2420Config.getPanAddr() {
! return m_pan;
}
--- 270,275 ----
}
! async command uint16_t CC2420Config.getPanAddr() {
! atomic return m_pan;
}
***************
*** 292,295 ****
--- 300,318 ----
/**
+ * @param on TRUE to turn address recognition on, FALSE to turn it off
+ */
+ command void CC2420Config.setAddressRecognition(bool on) {
+ atomic addressRecognition = on;
+ }
+
+ /**
+ * @return TRUE if address recognition is enabled
+ */
+ async command bool CC2420Config.isAddressRecognitionEnabled() {
+ atomic return addressRecognition;
+ }
+
+
+ /**
* Sync must be called for acknowledgement changes to take effect
* @param enableAutoAck TRUE to enable auto acknowledgements
***************
*** 307,315 ****
*/
async command bool CC2420Config.isHwAutoAckDefault() {
! bool isHwAck;
! atomic {
! isHwAck = hwAutoAckDefault;
! }
! return isHwAck;
}
--- 330,334 ----
*/
async command bool CC2420Config.isHwAutoAckDefault() {
! atomic return hwAutoAckDefault;
}
***************
*** 318,326 ****
*/
async command bool CC2420Config.isAutoAckEnabled() {
! bool isAckEnabled;
! atomic {
! isAckEnabled = autoAckEnabled;
! }
! return isAckEnabled;
}
--- 337,341 ----
*/
async command bool CC2420Config.isAutoAckEnabled() {
! atomic return autoAckEnabled;
}
***************
*** 428,432 ****
atomic {
call MDMCTRL0.write( ( 1 << CC2420_MDMCTRL0_RESERVED_FRAME_MODE ) |
! ( 1 << CC2420_MDMCTRL0_ADR_DECODE ) |
( 2 << CC2420_MDMCTRL0_CCA_HYST ) |
( 3 << CC2420_MDMCTRL0_CCA_MOD ) |
--- 443,447 ----
atomic {
call MDMCTRL0.write( ( 1 << CC2420_MDMCTRL0_RESERVED_FRAME_MODE ) |
! ( addressRecognition << CC2420_MDMCTRL0_ADR_DECODE ) |
( 2 << CC2420_MDMCTRL0_CCA_HYST ) |
( 3 << CC2420_MDMCTRL0_CCA_MOD ) |
More information about the Tinyos-2-commits
mailing list