]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/tests/TestPrintf/TestPrintfC.nc
Updates to files after running the majority of the telosb rc3 tests
[tinyos-2.x.git] / apps / tests / TestPrintf / TestPrintfC.nc
index 5d970f329866d5a05d7a1e8d2627da8ff7e79683..ab9d625b07d54bfe7c063af2cd31dbf14c916c92 100644 (file)
@@ -36,6 +36,7 @@
 module TestPrintfC @safe() {
   uses {
     interface Boot;
+    interface Timer<TMilli>;
   }
 }
 implementation {
@@ -45,10 +46,14 @@ implementation {
   uint32_t dummyVar3 = 1234567890;
 
   event void Boot.booted() {
+       call Timer.startPeriodic(1000);
+  }
+
+  event void Timer.fired() {
        printf("Hi I am writing to you from my TinyOS application!!\n");
        printf("Here is a uint8: %u\n", dummyVar1);
        printf("Here is a uint16: %u\n", dummyVar2);
-       printf("Here is a uint32: %ld\n", dummyVar3);
+       printf("Here is a uint32: %lu\n", dummyVar3);
        printfflush();
   }
 }