added #ifdef CRT_DISPLAY to provide a printf version of debug()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@345 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
db64fa259b
commit
f2c1255922
1 changed files with 22 additions and 0 deletions
|
@ -20,10 +20,13 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include "config.h"
|
||||
|
||||
char debugmembuf[100];
|
||||
char debugbuf[200];
|
||||
|
||||
#ifndef CRT_DISPLAY /* allow non archos platforms to display output */
|
||||
|
||||
static int debug_tx_ready(void)
|
||||
{
|
||||
return (SSR1 & SCI_TDRE);
|
||||
|
@ -181,3 +184,22 @@ void debugf(char *fmt, ...)
|
|||
va_end(ap);
|
||||
debug(debugmembuf);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void debug( const char *message )
|
||||
{
|
||||
printf( message );
|
||||
}
|
||||
|
||||
void debugf(char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start( ap, fmt );
|
||||
vsprintf( debugmembuf, fmt, ap );
|
||||
va_end( ap );
|
||||
printf( debugmembuf );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue