]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
fix to apps to get them to compile on all supported platforms
authorklueska <klueska>
Thu, 24 Jul 2008 23:53:46 +0000 (23:53 +0000)
committerklueska <klueska>
Thu, 24 Jul 2008 23:53:46 +0000 (23:53 +0000)
apps/tosthreads/apps/Blink/BlinkAppC.nc
apps/tosthreads/apps/TestBasicsbSensors/TestBasicsbSensorsC.nc
apps/tosthreads/apps/TestSineSensor/TestSineSensorC.nc
apps/tosthreads/capps/TestLogStorage/Makefile
apps/tosthreads/capps/TestSineSensor/TestSineSensor.c

index 7748e878667a9395b9291d2cfc81abb750413747..d95f71926d22d518532cb13c99769f16db086aeb 100644 (file)
@@ -37,10 +37,10 @@ configuration BlinkAppC {
 }
 implementation {
   components MainC, BlinkC,  LedsC;
-  components new ThreadC(800) as NullThread;
-  components new ThreadC(800) as TinyThread0;
-  components new ThreadC(800) as TinyThread1;
-  components new ThreadC(800) as TinyThread2;
+  components new ThreadC(100) as NullThread;
+  components new ThreadC(100) as TinyThread0;
+  components new ThreadC(100) as TinyThread1;
+  components new ThreadC(100) as TinyThread2;
 
   MainC.Boot <- BlinkC;
   BlinkC.NullThread -> NullThread;
index 0288ad2020de0910c94ead2c17408fd85612fee6..f43e886860d5f72bfaf234941c2a82270bc0e523 100644 (file)
@@ -69,4 +69,5 @@ implementation {
       call Leds.led0Toggle();
     }
   }
-}
\ No newline at end of file
+}
+
index 9290a67bac795878b1f678ba350bbb3e66795480..f3a277739157fb06432a87a676946159b4aa01fe 100644 (file)
@@ -62,4 +62,5 @@ implementation {
       call Leds.led0Toggle();
     }
   }
-}
\ No newline at end of file
+}
+
index 957c956821f48a7955f55a3ede5d22793bdda11c..5a4a3997dcd6976c69b8ed44db401afd04004545 100644 (file)
@@ -1,2 +1,19 @@
 TOSTHREAD_MAIN=TestLogStorage.c
-include $(MAKERULES)
+THIS_SUPPORTED_PLATFORMS=tmote telos telosb eyesIFXv1 eyesIFXv2 mica2 mica2dot telosa eyesIFX micaz iris tinynode
+
+ifneq ($(filter $(THIS_SUPPORTED_PLATFORMS) clean,$(MAKECMDGOALS)),)
+        ifneq ($(filter tmote telos telosb eyesIFXv1,$(MAKECMDGOALS)),)
+                CFLAGS+=-DUSE_STM25P
+        endif
+        ifneq ($(filter mica2 telosa mica2dot eyesIFX eyesIFXv2 micaz iris tinynode,$(MAKECMDGOALS)),)
+                CFLAGS+=-DUSE_AT45DB
+        endif
+
+        include $(MAKERULES)
+else
+%:
+       @echo "    Sorry, this application is only written to work with the following platforms:"
+       @echo "        $(THIS_SUPPORTED_PLATFORMS)"
+cthreads:
+       @:
+endif
index 2f676b22c1c37434cd9d865e9de7d4a79f18fd69..bf2f7d61da4644a9595588226234bd1cb98bbf07 100644 (file)
@@ -49,4 +49,5 @@ void tosthread_main(void* arg) {
     while( amSerialSend(AM_BROADCAST_ADDR, &msg, sizeof(uint16_t), 228) != SUCCESS );
     led0Toggle();
   }
-}
\ No newline at end of file
+}
+