X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=examples%2Fdemo%2Fdemo.c;h=efdf37ec334aa26b5e161433b424e659f4accd06;hb=56f2c002c50338f23f1b969ba51a43b0eb24f3da;hp=e77eab902b1f2cc7acd2e5a42fd582acf461da3d;hpb=44c33872116ab2e2b96f9d919f926c4a9179d796;p=bertos.git diff --git a/examples/demo/demo.c b/examples/demo/demo.c index e77eab90..efdf37ec 100644 --- a/examples/demo/demo.c +++ b/examples/demo/demo.c @@ -33,7 +33,6 @@ * * \author Bernie Innocenti */ - #include #include @@ -41,6 +40,7 @@ #include #include +#include #include #include @@ -228,6 +228,12 @@ void proc_demo(void) proc_testRun(); } +void sem_demo(void) +{ + sem_testRun(); + sem_testTearDown(); +} + void timer_demo(void) { timer_testRun(); @@ -284,6 +290,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)"Semaphores", 0, (MenuHook)sem_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 }, @@ -303,10 +310,10 @@ int main(int argc, char *argv[]) emul_init(&argc, argv); timer_init(); + proc_init(); buz_init(); kbd_init(); lcd_gfx_qt_init(&lcd_bitmap); - proc_init(); monitor_start(KERN_MINSTACKSIZE, monitor_stack); menu_handle(&main_menu);