3 * Author: Christian Starkjohann
4 * Creation Date: 2005-01-16
6 * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
7 * License: Proprietary, free under certain conditions. See Documentation.
8 * This Revision: $Id: oddebug.c 215 2006-07-10 21:54:51Z cs $
15 static uchar Warning__Never_compile_production_devices_with_debugging
;
16 /* The "#warning" preprocessor directive is non-standard. The unused static
17 * variable above should give a compiler warning on all compilers.
20 static void uartPutc(char c
)
22 while(!(ODDBG_USR
& (1 << ODDBG_UDRE
))); /* wait for data register empty */
26 static uchar
hexAscii(uchar h
)
30 h
+= 'a' - (uchar
)10 - '0';
35 static void printHex(uchar c
)
37 uartPutc(hexAscii(c
>> 4));
38 uartPutc(hexAscii(c
));
41 void odDebug(uchar prefix
, uchar
*data
, uchar len
)