Ignore tags and .gdb_history
[bertos.git] / app / demo / demo.c
index c13fdf78cb68d31192f5a484bba89ba75000886e..ed64a12d404f78ac6ef3e2703955d8da9c5e18fc 100644 (file)
  *
  * \version $Id: demo.c 18242 2007-10-08 17:35:23Z marco $
  *
- * \author Bernardo Innocenti <bernie@develer.com>
+ * \author Bernie Innocenti <bernie@codewiz.org>
  *
  * \brief Windowing system test.
  */
 
+#include <cfg/macros.h>
+
 #include <emul/emul.h>
+
 #include <kern/proc.h>
 #include <kern/msg.h>
+
 #include <drv/timer.h>
 #include <drv/buzzer.h>
 #include <drv/lcd_gfx.h>
 #include <drv/kbd.h>
+
 #include <gfx/gfx.h>
 #include <gfx/win.h>
 #include <gfx/text.h>
 #include <gfx/font.h>
+
 #include <gui/menu.h>
 #include <icons/logo.h>
-#include <cfg/macros.h>
 
 /**
  * Draw a pentacle in the provided bitmap.
@@ -218,9 +223,13 @@ void win_demo(Bitmap *bm)
 
 void proc_demo(void)
 {
-       extern void proc_test(void);
-// FIXME: proc_test() cause segmentation fault. 
-       proc_test();
+       proc_testRun();
+}
+
+void timer_demo(void)
+{
+       timer_testRun();
+       timer_testTearDown();
 }
 
 
@@ -273,6 +282,7 @@ static struct MenuItem main_items[] =
        { (const_iptr_t)"Bounce!",     0, (MenuHook)bouncing_logo,(iptr_t)&lcd_bitmap    },
        { (const_iptr_t)"Hello World", 0, (MenuHook)hello_world,  (iptr_t)&lcd_bitmap    },
        { (const_iptr_t)"Scheduling",  0, (MenuHook)proc_demo,    (iptr_t)&lcd_bitmap    },
+       { (const_iptr_t)"Timer Test",  0, (MenuHook)timer_demo,   (iptr_t)&lcd_bitmap    },
        { (const_iptr_t)"Menu MX",     0, (MenuHook)menu_handle,  (iptr_t)&mx_menu       },
        { (const_iptr_t)"Display",     0, (MenuHook)menu_handle,  (iptr_t)&display_menu  },
        { (const_iptr_t)"Settings",    0, (MenuHook)menu_handle,  (iptr_t)&settings_menu },
@@ -292,6 +302,7 @@ int main(int argc, char *argv[])
 
        menu_handle(&main_menu);
 
+       timer_cleanup();
        emul_cleanup();
        return 0;
 }