Forward compatibility: build relative-base link libraries where needed
[AROS.git] / arch / arm-efika / kernel / kernel_debug.c
blobf3d914d619969f9ea9067061040c8c1267538b16
1 /*
2 Copyright � 1995-2010, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: kernel_debug.c
6 Lang: english
7 */
9 #include <exec/types.h>
10 #include <aros/kernel.h>
11 #include <inttypes.h>
13 #include <kernel_base.h>
14 #include <kernel_debug.h>
16 #include <hardware/mx51_uart.h>
18 static volatile MX51_UART * const uart = (MX51_UART *)UART1_BASE_ADDR;
20 static inline void waitBusy()
22 while((uart->USR2 & UART_USR2_TXDC) == 0);
25 static inline void putByte(uint8_t chr)
27 if (chr == '\n')
28 uart->UTXD = '\r';
29 uart->UTXD = chr;
32 void (*_KrnPutC)(char) = NULL;
34 void krnSerPutC(int chr)
36 putByte(chr);
37 waitBusy();
40 int krnPutC(int chr, struct KernelBase *KernelBase)
42 if (chr == 0x03)
43 _KrnPutC = NULL;
44 else
46 if (_KrnPutC)
47 _KrnPutC(chr);
49 krnSerPutC(chr);
52 return 0;