summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/debug.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/firmware/debug.c b/firmware/debug.c
index 5cd1f15a38..d2186049aa 100644
--- a/firmware/debug.c
+++ b/firmware/debug.c
@@ -20,10 +20,13 @@
20#include <string.h> 20#include <string.h>
21#include <stdio.h> 21#include <stdio.h>
22#include <stdarg.h> 22#include <stdarg.h>
23#include "config.h"
23 24
24char debugmembuf[100]; 25char debugmembuf[100];
25char debugbuf[200]; 26char debugbuf[200];
26 27
28#ifndef CRT_DISPLAY /* allow non archos platforms to display output */
29
27static int debug_tx_ready(void) 30static int debug_tx_ready(void)
28{ 31{
29 return (SSR1 & SCI_TDRE); 32 return (SSR1 & SCI_TDRE);
@@ -181,3 +184,22 @@ void debugf(char *fmt, ...)
181 va_end(ap); 184 va_end(ap);
182 debug(debugmembuf); 185 debug(debugmembuf);
183} 186}
187
188#else
189
190void debug( const char *message )
191{
192 printf( message );
193}
194
195void debugf(char *fmt, ...)
196{
197 va_list ap;
198
199 va_start( ap, fmt );
200 vsprintf( debugmembuf, fmt, ap );
201 va_end( ap );
202 printf( debugmembuf );
203}
204#endif
205