[Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/TestAlarm BlinkC.nc, NONE, 1.1.4.2 BlinkM.nc, NONE, 1.1.4.2 Makefile, NONE, 1.1.4.2

Kevin Klues klueska at users.sourceforge.net
Mon May 15 11:35:25 PDT 2006


Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/TestAlarm
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18756/apps/tests/TestAlarm

Added Files:
      Tag: tos-2-resource-pm-eval-cand
	BlinkC.nc BlinkM.nc Makefile 
Log Message:
Merging the development branch with the resource/power management evaluation branch.  After this merge all files except those already commited should be identical.

--- NEW FILE: BlinkC.nc ---
// $Id: BlinkC.nc,v 1.1.4.2 2006/05/15 18:35:23 klueska Exp $

configuration BlinkC
{
}
implementation
{
  components MainC, BlinkM, LedsC, new AlarmMilliC() as AlarmC;
  BlinkM.Boot -> MainC;
  
  MainC.SoftwareInit -> AlarmC;
  BlinkM.Leds -> LedsC;
  BlinkM.Alarm -> AlarmC;
}


--- NEW FILE: BlinkM.nc ---
// $Id: BlinkM.nc,v 1.1.4.2 2006/05/15 18:35:23 klueska Exp $

#include "Timer.h"

module BlinkM
{
  uses interface Boot;
  uses interface Leds;
  uses interface Alarm<TMilli,uint32_t> as Alarm;
}
implementation
{
  enum { DELAY_MILLI = 512 };

  event void Boot.booted()
  {
    atomic
    {
      call Leds.led1On();
      call Alarm.start( DELAY_MILLI );
    }
  }

  async event void Alarm.fired()
  {
    atomic
    {
      // this usage produces a periodic alarm with no frequency skew
      call Alarm.startAt( call Alarm.getAlarm(), DELAY_MILLI );
      call Leds.led0Toggle();
    }
  }
}


--- NEW FILE: Makefile ---
COMPONENT=BlinkC
include $(MAKERULES)




More information about the Tinyos-2-commits mailing list