]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
blink LEDs
authormmaroti <mmaroti>
Tue, 24 Nov 2009 07:11:03 +0000 (07:11 +0000)
committermmaroti <mmaroti>
Tue, 24 Nov 2009 07:11:03 +0000 (07:11 +0000)
apps/tests/rf230/RadioCountToDiag/RadioCountToDiagC.nc
apps/tests/rf230/RadioCountToDiag/RadioCountToDiagP.nc

index 4cb5b6e4f0db07b59f094c723e625c240bb83e46..931e0737b95827c335d4cb87ea54e155d50f3187 100644 (file)
@@ -27,7 +27,7 @@ configuration RadioCountToDiagC
 
 implementation
 {
-       components MainC, RadioCountToDiagP, DiagMsgC;
+       components MainC, RadioCountToDiagP, DiagMsgC, LedsC;
        components ActiveMessageC, SerialActiveMessageC;
        components new TimerMilliC() as SendTimerC;
        components new TimerMilliC() as ReportTimerC;
@@ -50,4 +50,6 @@ implementation
        RadioCountToDiagP.ActiveMessageAddress -> ActiveMessageAddressC;
 
        RadioCountToDiagP.LowPowerListening -> ActiveMessageC;
+
+       RadioCountToDiagP.Leds -> LedsC;
 }
index 324675d09c64924d4b6e66cd37afac5e3d33beb2..0cf4d49c1dc5482a9e01ab37a455567abe5a7c24 100644 (file)
@@ -42,11 +42,13 @@ module RadioCountToDiagP
 
                interface ActiveMessageAddress;
                interface LowPowerListening;
+
+               interface Leds;
        }
 }
 
 #ifndef SEND_PERIOD
-#define SEND_PERIOD 10
+#define SEND_PERIOD 20
 #endif
 
 #ifndef SLEEP_INTERVAL
@@ -116,6 +118,8 @@ implementation
 
        event void ReportTimer.fired()
        {
+               call Leds.led0Toggle();
+
                if( call DiagMsg.record() )
                {
                        call DiagMsg.uint16(sendCount);
@@ -141,6 +145,8 @@ implementation
        {
                uint16_t addr;
 
+               call Leds.led1Toggle();
+               
                call Packet.clear(&txMsg);
                call PacketAcknowledgements.requestAck(&txMsg);
 #ifdef LOW_POWER_LISTENING