]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/tutorials/BlinkConfig/BlinkConfigAppC.nc
New tutorial
[tinyos-2.x.git] / apps / tutorials / BlinkConfig / BlinkConfigAppC.nc
index f990b6ccfe77630eac07c497de61a6cfb46c6513..ee271cdaea8cacc5760b5832c0491d1c6f9cb8df 100644 (file)
  * UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
  */
 #include "StorageVolumes.h"
+#include "Timer.h"
 
 /**
- * Application to demonstrate the ConfigStorageC abstraction.  A value
- * is written to, and read from, the flash storage. A successful test
- * will turn on both the green and blue (yellow) LEDs.  A failed test
- * is any other LED configuration.
+ * Application to demonstrate the ConfigStorageC abstraction.  A timer
+ * period is read from flash, divided by two, and written back to
+ * flash.  An LED is toggled each time the timer fires.
  *
- * @author Prabal Dutta
+ * @author Prabal Dutta <prabal@cs.berkeley.edu>
  */
 configuration BlinkConfigAppC {
 }
@@ -39,12 +39,11 @@ implementation {
   components BlinkConfigC as App;
   components new ConfigStorageC(VOLUME_CONFIGTEST);
   components MainC, LedsC, PlatformC, SerialActiveMessageC;
+  components new TimerMilliC() as Timer0;
 
-  App.Boot -> MainC.Boot;
-
-  App.AMControl -> SerialActiveMessageC;
-  App.AMSend    -> SerialActiveMessageC.AMSend[1];
-  App.Config    -> ConfigStorageC.ConfigStorage;
-  App.Mount     -> ConfigStorageC.Mount;
-  App.Leds      -> LedsC;
+  App.Boot   -> MainC.Boot;
+  App.Config -> ConfigStorageC.ConfigStorage;
+  App.Mount  -> ConfigStorageC.Mount;
+  App.Leds   -> LedsC;
+  App.Timer0 -> Timer0;
 }