|
Message
From: cvs at opencores.org<cvs@o...>
Date: Sat May 26 22:02:18 CEST 2007
Subject: [cvs-checkins] MODIFIED: mlite ...
Date: 00/07/05 26:22:02 Modified: mlite/kernel uart.c Log: Added ability to filter print messages with "!M#~" Revision Changes Path 1.6 mlite/kernel/uart.c http://www.opencores.org/cvsweb.shtml/mlite/kernel/uart.c.diff?r1=1.5&r2=1.6 (In the diff below, changes in quantity of whitespace are not shown.) Index: uart.c =================================================================== RCS file: /cvsroot/rhoads/mlite/kernel/uart.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- uart.c 12 Feb 2007 04:59:56 -0000 1.5 +++ uart.c 26 May 2007 20:02:17 -0000 1.6 @@ -323,6 +323,25 @@ int arg4, int arg5, int arg6, int arg7) { uint8 *ptr; +#if 0 + //Check for string "!M#~" to mask print statement + static char moduleLevel[26]; + if(format[0] == '!' && format[3] == '~' && + 'A' <= format[1] && format[1] <= 'Z') + { + int module = format[1] - 'A'; + int level = format[2] - '5'; + if(format[2] == '#') + { + //Set level with "!M#~#" + moduleLevel[module] = (char)(format[4] - '5'); + return; + } + if(level < moduleLevel[module]) + return; + format += 4; + } +#endif OS_SemaphorePend(SemaphoreUart, OS_WAIT_FOREVER); sprintf(PrintfString, format, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); @@ -466,7 +485,6 @@ /******************************************/ -#ifndef WIN32 int puts(const char *string) { uint8 *ptr; @@ -493,7 +511,6 @@ { return ReadBuffer->read != ReadBuffer->write; } -#endif /******************************************/
|
 |