summaryrefslogtreecommitdiff
path: root/nuttx/arch/z80/src
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/z80/src')
-rw-r--r--nuttx/arch/z80/src/common/up_initialize.c12
-rw-r--r--nuttx/arch/z80/src/common/up_internal.h22
-rw-r--r--nuttx/arch/z80/src/ez80/ez80_lowuart.c8
-rw-r--r--nuttx/arch/z80/src/ez80/ez80_serial.c10
-rw-r--r--nuttx/arch/z80/src/z8/z8_lowuart.c8
-rwxr-xr-xnuttx/arch/z80/src/z8/z8_serial.c10
6 files changed, 41 insertions, 29 deletions
diff --git a/nuttx/arch/z80/src/common/up_initialize.c b/nuttx/arch/z80/src/common/up_initialize.c
index 1c71fa517..a4659a2e9 100644
--- a/nuttx/arch/z80/src/common/up_initialize.c
+++ b/nuttx/arch/z80/src/common/up_initialize.c
@@ -1,8 +1,8 @@
/****************************************************************************
* arch/z80/src/common/up_initialize.c
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -153,14 +153,18 @@ void up_initialize(void)
/* Initialize the serial device driver */
-#ifdef CONFIG_USE_LOWUARTINIT
+#ifdef USE_LOWUARTINIT
up_lowuartinit();
#endif
-#ifdef CONFIG_USE_SERIALDRIVER
+ /* Initialize the console device driver */
+
+#if defined(USE_SERIALDRIVER)
up_serialinit();
#elif defined(CONFIG_DEV_LOWCONSOLE)
lowconsole_init();
+#elif defined(CONFIG_RAMLOG_CONSOLE)
+ ramlog_consoleinit();
#endif
/* Initialize the netwok */
diff --git a/nuttx/arch/z80/src/common/up_internal.h b/nuttx/arch/z80/src/common/up_internal.h
index 2e5afb2e3..919a74353 100644
--- a/nuttx/arch/z80/src/common/up_internal.h
+++ b/nuttx/arch/z80/src/common/up_internal.h
@@ -69,15 +69,15 @@
/* Determine which (if any) console driver to use */
#if CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE)
-# undef CONFIG_USE_SERIALDRIVER
+# undef USE_SERIALDRIVER
# ifdef CONFIG_HAVE_LOWUARTINIT
-# define CONFIG_USE_LOWUARTINIT 1
+# define USE_LOWUARTINIT 1
# else
-# undef CONFIG_USE_LOWUARTINIT
+# undef USE_LOWUARTINIT
# endif
#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
-# define CONFIG_USE_SERIALDRIVER 1
-# undef CONFIG_USE_LOWUARTINIT
+# define USE_SERIALDRIVER 1
+# undef USE_LOWUARTINIT
#endif
/****************************************************************************
@@ -105,7 +105,7 @@ extern "C" {
EXTERN void up_irqinitialize(void);
EXTERN int up_timerisr(int irq, FAR chipreg_t *regs);
-#ifdef CONFIG_USE_LOWUARTINIT
+#ifdef USE_LOWUARTINIT
EXTERN void up_lowuartinit(void);
#endif
@@ -125,7 +125,7 @@ void up_addregion(void);
/* Defined in up_serial.c */
-#ifdef CONFIG_USE_SERIALDRIVER
+#ifdef USE_SERIALDRIVER
EXTERN void up_serialinit(void);
#else
# define up_serialinit()
@@ -139,6 +139,14 @@ EXTERN void lowconsole_init(void);
# define lowconsole_init()
#endif
+/* Defined in drivers/ramlog.c */
+
+#ifdef CONFIG_RAMLOG_CONSOLE
+extern void ramlog_consoleinit(void);
+#else
+# define ramlog_consoleinit()
+#endif
+
/* Low level string output */
extern void up_puts(const char *str);
diff --git a/nuttx/arch/z80/src/ez80/ez80_lowuart.c b/nuttx/arch/z80/src/ez80/ez80_lowuart.c
index 307cecc59..ed4f92fac 100644
--- a/nuttx/arch/z80/src/ez80/ez80_lowuart.c
+++ b/nuttx/arch/z80/src/ez80/ez80_lowuart.c
@@ -1,8 +1,8 @@
/****************************************************************************
* arch/z80/src/ez80/ez80_loweruart.c
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -49,7 +49,7 @@
#include "chip/chip.h"
#include "common/up_internal.h"
-#ifdef CONFIG_USE_LOWUARTINIT
+#ifdef USE_LOWUARTINIT
/****************************************************************************
* Private Definitions
@@ -253,4 +253,4 @@ void up_lowuartinit(void)
#endif /* HAVE_SERIAL */
}
-#endif /* CONFIG_USE_LOWUARTINIT */
+#endif /* USE_LOWUARTINIT */
diff --git a/nuttx/arch/z80/src/ez80/ez80_serial.c b/nuttx/arch/z80/src/ez80/ez80_serial.c
index 7b3ea7409..8fbbe46c1 100644
--- a/nuttx/arch/z80/src/ez80/ez80_serial.c
+++ b/nuttx/arch/z80/src/ez80/ez80_serial.c
@@ -1,8 +1,8 @@
/****************************************************************************
* arch/z80/src/ez08/ez80_serial.c
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -58,7 +58,7 @@
#include "os_internal.h"
#include "up_internal.h"
-#ifdef CONFIG_USE_SERIALDRIVER
+#ifdef USE_SERIALDRIVER
/****************************************************************************
* Definitions
@@ -774,7 +774,7 @@ int up_putc(int ch)
#endif
}
-#else /* CONFIG_USE_SERIALDRIVER */
+#else /* USE_SERIALDRIVER */
/****************************************************************************
* Definitions
@@ -839,4 +839,4 @@ int up_putc(int ch)
return ch;
}
-#endif /* CONFIG_USE_SERIALDRIVER */
+#endif /* USE_SERIALDRIVER */
diff --git a/nuttx/arch/z80/src/z8/z8_lowuart.c b/nuttx/arch/z80/src/z8/z8_lowuart.c
index 15a7999ec..07832572c 100644
--- a/nuttx/arch/z80/src/z8/z8_lowuart.c
+++ b/nuttx/arch/z80/src/z8/z8_lowuart.c
@@ -1,8 +1,8 @@
/****************************************************************************
* arch/z80/src/z8/z8_loweruart.c
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -49,7 +49,7 @@
#include "chip/chip.h"
#include "common/up_internal.h"
-#ifdef CONFIG_USE_LOWUARTINIT
+#ifdef USE_LOWUARTINIT
extern uint32_t get_freq(void);
@@ -127,4 +127,4 @@ void up_lowuartinit(void)
putreg8(0xc0, U1CTL0); /* Transmit enable, Receive enable, no Parity, 1 Stop bit */
#endif
}
-#endif /* CONFIG_USE_LOWUARTINIT */ \ No newline at end of file
+#endif /* USE_LOWUARTINIT */ \ No newline at end of file
diff --git a/nuttx/arch/z80/src/z8/z8_serial.c b/nuttx/arch/z80/src/z8/z8_serial.c
index f1427eaae..db13ab67d 100755
--- a/nuttx/arch/z80/src/z8/z8_serial.c
+++ b/nuttx/arch/z80/src/z8/z8_serial.c
@@ -1,8 +1,8 @@
/****************************************************************************
* arch/z80/src/z8/z8_serial.c
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -58,7 +58,7 @@
#include "os_internal.h"
#include "up_internal.h"
-#ifdef CONFIG_USE_SERIALDRIVER
+#ifdef USE_SERIALDRIVER
extern uint32_t get_freq(void);
@@ -790,7 +790,7 @@ int up_putc(int ch)
return ch;
}
-#else /* CONFIG_USE_SERIALDRIVER */
+#else /* USE_SERIALDRIVER */
/****************************************************************************
* Definitions
@@ -856,4 +856,4 @@ int up_putc(int ch)
return ch;
}
-#endif /* CONFIG_USE_SERIALDRIVER */
+#endif /* USE_SERIALDRIVER */