MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / arch / nios2nommu / kernel / nios_gdb_stub_io.c
blobe0d8f82ad7574719aa88194fc3227a3532a15895
1 // Modified for uClinux - Vic - Apr 2002
2 // From:
4 // file: nios_gdb_stub_IO.c
5 //
6 // Single character I/O for Nios GDB Stub
8 #ifndef __KERNEL__
9 #include "nios.h"
10 #else
11 #include <asm/nios.h>
12 #endif
14 #include "nios_gdb_stub.h"
16 #ifdef nasys_debug_uart
17 #define GDB_UART nasys_debug_uart
18 #endif
20 char GDBGetChar(void)
22 char c = 0;
24 #ifdef GDB_UART
25 while( (c = (char)nr_uart_rxchar(GDB_UART)) < 0 )
27 #endif
29 return c;
32 void GDBPutChar(char c)
34 #ifdef GDB_UART
35 nr_uart_txchar(c, GDB_UART);
36 #endif
39 // End of file