summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/csb337/console/uarts.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-06-18 19:58:27 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-06-18 19:58:27 +0000
commit737f8c4d5d0d1ee70919c1e5b467d3ecd0e6096c (patch)
tree3391fc5ab864c97d08b66cacbc47cc3b6f2ce5b7 /c/src/lib/libbsp/arm/csb337/console/uarts.c
parent2009-06-18 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-737f8c4d5d0d1ee70919c1e5b467d3ecd0e6096c.tar.bz2
2009-06-18 Fernando Nicodemos <fgnicodemos@terra.com.br>
* Makefile.am, configure.ac, console/uarts.c: Add console device that uses MicroMonitor to do actual input and output. This driver should work on any board that uses MicroMonitor.
Diffstat (limited to 'c/src/lib/libbsp/arm/csb337/console/uarts.c')
-rw-r--r--c/src/lib/libbsp/arm/csb337/console/uarts.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/c/src/lib/libbsp/arm/csb337/console/uarts.c b/c/src/lib/libbsp/arm/csb337/console/uarts.c
index a4713dd5a5..8bc1977c47 100644
--- a/c/src/lib/libbsp/arm/csb337/console/uarts.c
+++ b/c/src/lib/libbsp/arm/csb337/console/uarts.c
@@ -32,16 +32,24 @@ rtems_device_minor_number Console_Port_Minor = 0;
extern console_fns dbgu_fns;
#if ENABLE_LCD
extern console_fns fbcons_fns;
- #define NUM_DEVS 2
+ #define LCD_DEVICE 1
#else
- #define NUM_DEVS 1
+ #define LCD_DEVICE 0
#endif
+#if ENABLE_UMON_CONSOLE
+ extern console_fns umoncons_fns;
+ #define UMON_CONSOLE_DEVICE 1
+#else
+ #define UMON_CONSOLE_DEVICE 0
+#endif
+
+#define NUM_DEVS (1 + LCD_DEVICE + UMON_CONSOLE_DEVICE)
+
/* These are used by code in console.c */
unsigned long Console_Port_Count = NUM_DEVS;
console_data Console_Port_Data[NUM_DEVS];
-
/*
* There's one item in array for each UART.
*
@@ -90,6 +98,27 @@ console_tbl Console_Port_Tbl[] = {
NULL, /* setData - NOT USED */
0, /* ulClock - NOT USED */
0 /* ulIntVector - NOT USED */
+ },
+#endif
+#if ENABLE_UMON_CONSOLE
+ {
+ "/dev/umon", /* sDeviceName */
+ SERIAL_CUSTOM, /* deviceType */
+ &umoncons_fns, /* pDeviceFns */
+ NULL, /* deviceProbe */
+ NULL, /* pDeviceFlow */
+ 0, /* ulMargin - NOT USED */
+ 0, /* ulHysteresis - NOT USED */
+ NULL, /* pDeviceParams */
+ 0, /* ulCtrlPort1 - Pointer to UMON regs */
+ 0, /* ulCtrlPort2 - NOT USED */
+ 0, /* ulDataPort - NOT USED */
+ NULL, /* getRegister - NOT USED */
+ NULL, /* setRegister - NOT USED */
+ NULL, /* getData - NOT USED */
+ NULL, /* setData - NOT USED */
+ 0, /* ulClock - NOT USED */
+ 0 /* ulIntVector - NOT USED */
}
#endif
};