From: mmaroti Date: Tue, 24 Nov 2009 07:11:03 +0000 (+0000) Subject: blink LEDs X-Git-Tag: rc_6_tinyos_2_1_1~129 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=04e65b0efb4a6fcbd94d8cb00fa8e8835aad0406 blink LEDs --- diff --git a/apps/tests/rf230/RadioCountToDiag/RadioCountToDiagC.nc b/apps/tests/rf230/RadioCountToDiag/RadioCountToDiagC.nc index 4cb5b6e4..931e0737 100644 --- a/apps/tests/rf230/RadioCountToDiag/RadioCountToDiagC.nc +++ b/apps/tests/rf230/RadioCountToDiag/RadioCountToDiagC.nc @@ -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; } diff --git a/apps/tests/rf230/RadioCountToDiag/RadioCountToDiagP.nc b/apps/tests/rf230/RadioCountToDiag/RadioCountToDiagP.nc index 324675d0..0cf4d49c 100644 --- a/apps/tests/rf230/RadioCountToDiag/RadioCountToDiagP.nc +++ b/apps/tests/rf230/RadioCountToDiag/RadioCountToDiagP.nc @@ -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