|
Message
From: cvs at opencores.org<cvs@o...>
Date: Sat May 26 22:04:45 CEST 2007
Subject: [cvs-checkins] MODIFIED: mlite ...
Date: 00/07/05 26:22:04 Modified: mlite/kernel rtos_test.c Log: Ignore error characters Revision Changes Path 1.7 mlite/kernel/rtos_test.c http://www.opencores.org/cvsweb.shtml/mlite/kernel/rtos_test.c.diff?r1=1.6&r2=1.7 (In the diff below, changes in quantity of whitespace are not shown.) Index: rtos_test.c =================================================================== RCS file: /cvsroot/rhoads/mlite/kernel/rtos_test.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- rtos_test.c 21 May 2007 02:51:46 -0000 1.6 +++ rtos_test.c 26 May 2007 20:04:44 -0000 1.7 @@ -431,7 +431,7 @@ void MainThread(void *Arg) { - int ch; + int ch, i; (void)Arg; #ifdef __MMU_ENUM_H__ OS_MMUInit(); @@ -439,7 +439,7 @@ #ifdef INCLUDE_HTML IPInit(NULL); - HtmlInit(0); + HtmlInit(1); #endif #ifdef INCLUDE_CONSOLE @@ -449,7 +449,6 @@ for(;;) { printf("\n"); - printf("0 Exit\n"); printf("1 CLib\n"); printf("2 Heap\n"); printf("3 Thread\n"); @@ -467,15 +466,6 @@ printf("%c\n", ch); switch(ch) { - case '0': -#ifndef WIN32 - //{ - //OS_FuncPtr_t funcPtr=NULL; - //OS_CriticalBegin(); - //funcPtr(NULL); - //} -#endif - return; case '1': TestCLib(); break; case '2': TestHeap(); break; case '3': TestThread(); break; @@ -494,6 +484,16 @@ case 'm': TestMathFull(); break; #endif case 'g': printf("Global=%d\n", ++Global); break; + default: + printf("Error"); + for(i = 0; i < 30; ++i) + { + if(kbhit()) + ch = UartRead(); + else + OS_ThreadSleep(1); + } + break; } } }
|
 |