Kernel/arm7 - Stubbing functions, now compiles and links
[tpg/acess2.git] / Kernel / arch / arm7 / debug.c
1 /**
2  */
3 #include <acess.h>
4
5 // === CONSTANTS ===
6 #define SERIAL_BASE     0x16000000
7 #define SERIAL_REG_DATA 0x0
8 #define SERIAL_REG_FLAG 0x18
9 #define SERIAL_FLAG_FULL        0x20
10
11 // === PROTOTYPES ===
12 void    KernelPanic_SetMode(void);
13 void    KernelPanic_PutChar(char Ch);
14 void    StartupPrint(const char *str);
15
16 // === GLOBALS ===
17  int    giDebug_SerialInitialised = 0;
18
19 // === CODE ===
20 void Debug_PutCharDebug(char ch)
21 {
22         while( *(volatile Uint32*)(SERIAL_BASE + SERIAL_REG_FLAG) & SERIAL_FLAG_FULL )
23                 ;
24         
25         *(volatile Uint32*)(SERIAL_BASE + SERIAL_REG_DATA) = ch;
26 }
27
28 void Debug_PutStringDebug(const char *str)
29 {
30         for( ; *str; str++ )
31                 Debug_PutCharDebug( *str );
32 }
33
34 void KernelPanic_SetMode(void)
35 {
36 }
37
38 void KernelPanic_PutChar(char ch)
39 {
40         Debug_PutCharDebug(ch);
41 }
42
43 void StartupPrint(const char *str)
44 {
45 }
46

UCC git Repository :: git.ucc.asn.au