]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/tests/cc2420/LplBroadcastCountToLeds/RadioCountToLedsC.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / apps / tests / cc2420 / LplBroadcastCountToLeds / RadioCountToLedsC.nc
index 34576fd14a3090d9f2d66f8c0c535a26633ba7e8..96205b7c96d94486ea15bd8803b4fb1aabf444dd 100644 (file)
  * every time it gets updated. A RadioCountToLeds node that hears a counter 
  * displays the bottom three bits on its LEDs. This application is a useful 
  * test to show that basic AM communication and timers work.
+ * <p>
+ * This version uses low-power listening.
  *
  * @author Philip Levis
- * @date   June 6 2005
+ * @date   June 24 2008
  */
 
 module RadioCountToLedsC {
@@ -69,7 +71,7 @@ implementation {
   event void AMControl.startDone(error_t err) {
     if (err == SUCCESS) {
       // Note we can setup LPL before or after the radio turns on
-      call LowPowerListening.setLocalSleepInterval(1000);
+      call LowPowerListening.setLocalWakeupInterval(1000);
       call MilliTimer.startOneShot(1500);
     }
     else {
@@ -94,7 +96,7 @@ implementation {
       }
 
       rcm->counter = counter;
-      call LowPowerListening.setRxSleepInterval(&packet, 1000);
+      call LowPowerListening.setRemoteWakeupInterval(&packet, 1000);
       if (call AMSend.send(AM_BROADCAST_ADDR, &packet, sizeof(radio_count_msg_t)) == SUCCESS) {
         dbg("RadioCountToLedsC", "RadioCountToLedsC: packet sent.\n", counter);        
         locked = TRUE;