From: asterix Date: Fri, 24 Apr 2009 16:30:11 +0000 (+0000) Subject: Add comments and explicit test for proc_testRun. X-Git-Tag: 2.1.0~19 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=db7dfd946338c575602b5bdc82e42d2b93ba52c3;p=bertos.git Add comments and explicit test for proc_testRun. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2663 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/examples/at91sam7s/at91sam7s.c b/examples/at91sam7s/at91sam7s.c index 8355e598..d47264bc 100644 --- a/examples/at91sam7s/at91sam7s.c +++ b/examples/at91sam7s/at91sam7s.c @@ -86,14 +86,15 @@ static void leds_toggle(void) timer_add(&leds_timer); } - int main(void) { char msg[]="BeRTOS, be fast be beatiful be realtime"; + + kdbg_init(); timer_init(); - proc_init(); + ASSERT(!IRQ_ENABLED()); /* Open the main communication port */ @@ -119,11 +120,21 @@ int main(void) /* turn first led on */ PIOA_CODR = 0x00000001; + /* + * Register timer and arm timer interupt. + */ timer_setSoftint(&leds_timer, (Hook)leds_toggle, 0); timer_setDelay(&leds_timer, ms_to_ticks(100)); timer_add(&leds_timer); - ASSERT(proc_testRun() == 0); + /* + * Run process test. + */ + if(!proc_testRun()) + kfile_printf(&ser_fd.fd, "ProcTest..ok!\n"); + else + kfile_printf(&ser_fd.fd, "ProcTest..FAIL!\n"); + // Main loop for(;;) {