]>
git.gir.st - tmk_keyboard.git/blob - ps2_vusb/usart_print.c
3 * Author: Christian Starkjohann
4 * Creation Date: 2005-01-16
6 * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
7 * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
8 * This Revision: $Id: oddebug.c 692 2008-11-07 15:07:40Z cs $
11 #include "usart_print.h"
15 int8_t sendchar(uint8_t c
)
17 while(!(ODDBG_USR
& (1 << ODDBG_UDRE
))); /* wait for data register empty */
24 while(!(ODDBG_USR
& (1 << ODDBG_UDRE
))); /* wait for data register empty */
28 static uchar
hexAscii(uchar h
)
32 h
+= 'a' - (uchar
)10 - '0';
37 void printHex(uchar c
)
39 uartPutc(hexAscii(c
>> 4));
40 uartPutc(hexAscii(c
));
43 void odDebug(uchar prefix
, uchar
*data
, uchar len
)