#include <sipapi.h>
#include "setup.h"
-// moved to config.h\r
+// moved to config.h
//#define FUART 0x40100000
-\r
+
void UART_puts(char *s)
{
{
UINT32 *base=(UINT32*)VirtualAlloc((void*)0x0,sizeof(void*)*0xffff, MEM_RESERVE,PAGE_READWRITE);
int ret=VirtualCopy(base,(void *) ((UARTBASE)/256),sizeof(void*)*0xffff , PAGE_READWRITE|PAGE_NOCACHE|PAGE_PHYSICAL);
-\r
-#ifdef STRONGARM\r
-// Apparently there is something we don't know. This is needed.\r
- HANDLE hSerial = CreateFile(L"COM1:", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);\r
-// disable UART\r
- base[0x0C/4] = 0;\r
-// clear status\r
- base[0x1C/4] = 0xFF;\r
-// set 8 bit no parity 1 stopbit\r
- base[0x00/4] = 9;\r
-// set 115200 bps\r
- base[0x04/4] = 0;\r
- base[0x08/4] = 1;\r
-// enable TX/RX\r
- base[0x0C/4] = 3;\r
+
+#ifdef STRONGARM
+// Apparently there is something we don't know. This is needed.
+ HANDLE hSerial = CreateFile(L"COM1:", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
+// disable UART
+ base[0x0C/4] = 0;
+// clear status
+ base[0x1C/4] = 0xFF;
+// set 8 bit no parity 1 stopbit
+ base[0x00/4] = 9;
+// set 115200 bps
+ base[0x04/4] = 0;
+ base[0x08/4] = 1;
+// enable TX/RX
+ base[0x0C/4] = 3;
#else
// set DLAB
base[0x0C/4]=128+2+1;
// UART enable & no FIFO
base[0x04/4]=64;
base[0x08/4]=0;
-#endif\r
+#endif
char test[]="LinExec: UART Initialized.\n\r";
int a=0;