Remove test function and move it in separate file. Reformat.
[bertos.git] / bertos / drv / timer_test.c
index 3e9338a89bdb226bab6f635ac35b6968f0a5dd14..5fc4257041924542cada51f8a521a3b07933f264 100644 (file)
  * \author Bernardo Innocenti <bernie@develer.com>
  */
 
-#ifdef _TEST
-       #include "timer.c"
-       #include "mware/event.c"
-       #include "os/hptime.c"
+#include <cfg/test.h>
 
-#else
-       #include <drv/timer.c>
-       #include <mware/event.c>
-       #include <drv/wdt.h>
+#include <drv/timer.h>
+#include <drv/wdt.h>
 
-#endif
+#include <mware/event.h>
 
 
 static void timer_test_constants(void)
@@ -131,6 +126,12 @@ static void timer_test_poll(void)
        }
 }
 
+#ifdef _TEST
+
+#include "timer.c"
+#include "mware/event.c"
+#include "os/hptime.c"
+
 int main(void)
 {
        wdt_init(7);
@@ -141,3 +142,5 @@ int main(void)
        timer_test_poll();
        return 0;
 }
+#endif
+