summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-06-02 22:19:44 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-06-02 22:19:44 +0000
commite7bde49248aedbc6e4cc8d71357683e2ace42ba3 (patch)
tree871489e71229dd83a09da1a259ec1abe7bd6669b /c
parentAs per Freescale chip errata, disable buffered writes. (diff)
downloadrtems-e7bde49248aedbc6e4cc8d71357683e2ace42ba3.tar.bz2
2009-06-02 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, configure.ac, preinstall.am, console/uarts.c, include/bsp.h, startup/memmap.c: Add support for /dev/fbcons which is a console type output only device to print to the LCD screen. The video controller (SED) and fonts are copied from MicroMonitor and proper attribution is made in those files and confirmed by Ed Sutter. * console/fbcons.c, console/font8x16.h, console/sed1356.c, console/sed1356_16bit.h, include/sed1356.h: New files.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/arm/csb337/ChangeLog10
-rw-r--r--c/src/lib/libbsp/arm/csb337/Makefile.am9
-rw-r--r--c/src/lib/libbsp/arm/csb337/configure.ac6
-rw-r--r--c/src/lib/libbsp/arm/csb337/console/fbcons.c138
-rwxr-xr-xc/src/lib/libbsp/arm/csb337/console/font8x16.h3600
-rw-r--r--c/src/lib/libbsp/arm/csb337/console/sed1356.c459
-rwxr-xr-xc/src/lib/libbsp/arm/csb337/console/sed1356_16bit.h547
-rw-r--r--c/src/lib/libbsp/arm/csb337/console/uarts.c79
-rw-r--r--c/src/lib/libbsp/arm/csb337/include/bsp.h3
-rw-r--r--c/src/lib/libbsp/arm/csb337/include/sed1356.h35
-rw-r--r--c/src/lib/libbsp/arm/csb337/preinstall.am13
-rw-r--r--c/src/lib/libbsp/arm/csb337/startup/memmap.c2
12 files changed, 4873 insertions, 28 deletions
diff --git a/c/src/lib/libbsp/arm/csb337/ChangeLog b/c/src/lib/libbsp/arm/csb337/ChangeLog
index eccbbde6a1..c7c0da2ba8 100644
--- a/c/src/lib/libbsp/arm/csb337/ChangeLog
+++ b/c/src/lib/libbsp/arm/csb337/ChangeLog
@@ -1,3 +1,13 @@
+2009-06-02 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * Makefile.am, configure.ac, preinstall.am, console/uarts.c,
+ include/bsp.h, startup/memmap.c: Add support for /dev/fbcons which is
+ a console type output only device to print to the LCD screen. The
+ video controller (SED) and fonts are copied from MicroMonitor and
+ proper attribution is made in those files and confirmed by Ed Sutter.
+ * console/fbcons.c, console/font8x16.h, console/sed1356.c,
+ console/sed1356_16bit.h, include/sed1356.h: New files.
+
2009-05-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, README, configure.ac, preinstall.am, start/start.S,
diff --git a/c/src/lib/libbsp/arm/csb337/Makefile.am b/c/src/lib/libbsp/arm/csb337/Makefile.am
index 8722546289..3bb9130283 100644
--- a/c/src/lib/libbsp/arm/csb337/Makefile.am
+++ b/c/src/lib/libbsp/arm/csb337/Makefile.am
@@ -12,6 +12,7 @@ dist_project_lib_DATA = bsp_specs
include_HEADERS = include/bsp.h
include_HEADERS += ../../shared/include/tm27.h
+include_HEADERS += include/sed1356.h
nodist_include_HEADERS = include/bspopts.h
nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
@@ -20,6 +21,11 @@ noinst_PROGRAMS =
nodist_include_HEADERS += ../../shared/include/coverhd.h
+if ENABLE_LCD
+nodist_include_HEADERS += console/sed1356_16bit.h
+nodist_include_HEADERS += console/font8x16.h
+endif
+
noinst_LIBRARIES = libbspstart.a
libbspstart_a_SOURCES = start/start.S
project_lib_DATA = start.$(OBJEXT)
@@ -39,6 +45,9 @@ libbsp_a_SOURCES += ../../shared/bsplibc.c ../../shared/bsppost.c \
../../shared/gnatinstallhandler.c
# console
libbsp_a_SOURCES += console/uarts.c ../../shared/console.c
+if ENABLE_LCD
+libbsp_a_SOURCES += console/sed1356.c console/fbcons.c
+endif
# abort
libbsp_a_SOURCES += ../shared/abort/abort.c
diff --git a/c/src/lib/libbsp/arm/csb337/configure.ac b/c/src/lib/libbsp/arm/csb337/configure.ac
index 2032528c9d..3408180aef 100644
--- a/c/src/lib/libbsp/arm/csb337/configure.ac
+++ b/c/src/lib/libbsp/arm/csb337/configure.ac
@@ -29,6 +29,12 @@ RTEMS_BSPOPTS_HELP([BSP_PRESS_KEY_FOR_RESET],
[If defined, print a message and wait until pressed before resetting
board when application exits.])
+RTEMS_BSPOPTS_SET([ENABLE_LCD],[*],[0])
+RTEMS_BSPOPTS_HELP([ENABLE_LCD],
+[If defined, enable use of the SED1356 controller.])
+
+AM_CONDITIONAL(ENABLE_LCD,test "$ENABLE_LCD" = "1")
+
RTEMS_BSPOPTS_SET([BSP_RESET_BOARD_AT_EXIT],[*],[1])
RTEMS_BSPOPTS_HELP([BSP_RESET_BOARD_AT_EXIT],
[If defined, reset the board when the application exits.])
diff --git a/c/src/lib/libbsp/arm/csb337/console/fbcons.c b/c/src/lib/libbsp/arm/csb337/console/fbcons.c
new file mode 100644
index 0000000000..a0967d1932
--- /dev/null
+++ b/c/src/lib/libbsp/arm/csb337/console/fbcons.c
@@ -0,0 +1,138 @@
+/*
+ * LCD Console Output Driver for CSBx37
+ *
+ * COPYRIGHT (c) 1989-2009.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+#include <rtems/libio.h>
+#include <termios.h>
+
+#include <rtems/bspIo.h>
+#include <libchip/serial.h>
+#include <libchip/sersupp.h>
+#include "sed1356.h"
+
+/* static function prototypes */
+static int fbcons_first_open(int major, int minor, void *arg);
+static int fbcons_last_close(int major, int minor, void *arg);
+static int fbcons_read(int minor);
+static int fbcons_write(int minor, const char *buf, int len);
+static void fbcons_init(int minor);
+static void fbcons_write_polled(int minor, char c);
+static int fbcons_set_attributes(int minor, const struct termios *t);
+
+/* Pointers to functions for handling the UART. */
+console_fns fbcons_fns =
+{
+ libchip_serial_default_probe,
+ fbcons_first_open,
+ fbcons_last_close,
+ fbcons_read,
+ fbcons_write,
+ fbcons_init,
+ fbcons_write_polled, /* not used in this driver */
+ fbcons_set_attributes,
+ FALSE /* TRUE if interrupt driven, FALSE if not. */
+};
+/*********************************************************************/
+/* Functions called via callbacks (i.e. the ones in uart_fns */
+/*********************************************************************/
+
+/*
+ * This is called the first time each device is opened. Since
+ * the driver is polled, we don't have to do anything. If the driver
+ * were interrupt driven, we'd enable interrupts here.
+ */
+static int fbcons_first_open(int major, int minor, void *arg)
+{
+ /* printk( "Frame buffer -- first open\n" ); */
+ return 0;
+}
+
+
+/*
+ * This is called the last time each device is closed. Since
+ * the driver is polled, we don't have to do anything. If the driver
+ * were interrupt driven, we'd disable interrupts here.
+ */
+static int fbcons_last_close(int major, int minor, void *arg)
+{
+ /* printk( "Frame buffer -- last close\n" ); */
+ return 0;
+}
+
+
+/*
+ * Read one character from UART.
+ *
+ * return -1 if there's no data, otherwise return
+ * the character in lowest 8 bits of returned int.
+ */
+static int fbcons_read(int minor)
+{
+ /* printk( "Frame buffer -- read\n" ); */
+ return -1;
+}
+
+
+/*
+ * Write buffer to LCD
+ *
+ * return 1 on success, -1 on error
+ */
+static int fbcons_write(int minor, const char *buf, int len)
+{
+ int i;
+
+ /* printk( "Frame buffer -- write\n" ); */
+ for ( i=0 ; i<len ; i++ )
+ sed_putchar( buf[i] );
+
+ return 1;
+}
+
+
+/* Set up the LCD controller. */
+static void fbcons_init(int minor)
+{
+ /* printk( "Initializing frame buffer\n" ); */
+ sed_init();
+}
+
+/* This is used for putchark support */
+static void fbcons_write_polled(int minor, char c)
+{
+ /* printk( "frame buffer -- write polled\n" ); */
+ sed_putchar( c );
+}
+
+/* This is for setting baud rate, bits, etc. */
+static int fbcons_set_attributes(int minor, const struct termios *t)
+{
+ /* printk( "frame buffer -- set attributes\n" ); */
+ return 0;
+}
+
+/***********************************************************************/
+/*
+ * The following functions are not used by TERMIOS, but other RTEMS
+ * functions use them instead.
+ */
+/***********************************************************************/
+/*
+ * Read from UART. This is used in the exit code, and can't
+ * rely on interrupts.
+ */
+int fbcons_poll_read(int minor)
+{
+ /* printk( "frame buffer -- poll read\n" ); */
+ return -1;
+}
diff --git a/c/src/lib/libbsp/arm/csb337/console/font8x16.h b/c/src/lib/libbsp/arm/csb337/console/font8x16.h
new file mode 100755
index 0000000000..2dac5e66c3
--- /dev/null
+++ b/c/src/lib/libbsp/arm/csb337/console/font8x16.h
@@ -0,0 +1,3600 @@
+/*
+ * font8x16.h
+ *
+ * Simple 8 x 16 font printable characters only. To lookoup, subtract
+ * FIRST_CHAR from the character, multiply x FONT_HEIGHT and get the next
+ * FONT_WIDTH bytes.
+ *
+ * Based upon code from MicroMonitor 1.17 from http://www.umonfw.com/
+ * which includes this notice:
+ *
+ **************************************************************************
+ * General notice:
+ * This code is part of a boot-monitor package developed as a generic base
+ * platform for embedded system designs. As such, it is likely to be
+ * distributed to various projects beyond the control of the original
+ * author. Please notify the author of any enhancements made or bugs found
+ * so that all may benefit from the changes. In addition, notification back
+ * to the author will allow the new user to pick up changes that may have
+ * been made by other users after this version of the code was distributed.
+ *
+ * Note1: the majority of this code was edited with 4-space tabs.
+ * Note2: as more and more contributions are accepted, the term "author"
+ * is becoming a mis-representation of credit.
+ *
+ * Original author: Ed Sutter
+ * Email: esutter@alcatel-lucent.com
+ * Phone: 908-582-2351
+ **************************************************************************
+ *
+ * Ed Sutter has been informed that this code is being used in RTEMS.
+ *
+ * The code has been reformatted to be more compliant with RTEMS
+ * coding standards and to eliminate C++ style comments.
+ *
+ * $Id$
+ */
+
+#define FONT_WIDTH 8
+#define FONT_HEIGHT 16
+#define FIRST_CHAR 0x20
+#define LAST_CHAR 0x7f
+#define CURSOR_ON 0x7F
+#define CURSOR_OFF 0x20
+
+const uint8_t font8x16[] = {
+
+
+/* Character (0x20):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character ! (0x21):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ** |
+ | **** |
+ | **** |
+ | **** |
+ | **** |
+ | ** |
+ | ** |
+ | |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x18,
+0x3c,
+0x3c,
+0x3c,
+0x3c,
+0x18,
+0x18,
+0x00,
+0x18,
+0x18,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character " (0x22):
+ ht=16, width=8
+ +--------+
+ | |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | * * |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x36,
+0x36,
+0x36,
+0x36,
+0x14,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character # (0x23):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ |******* |
+ | ** ** |
+ | ** ** |
+ |******* |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x6c,
+0x6c,
+0x6c,
+0xfe,
+0x6c,
+0x6c,
+0xfe,
+0x6c,
+0x6c,
+0x6c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character $ (0x24):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ** |
+ | ** |
+ | ***** |
+ |** ** |
+ |** |
+ | **** |
+ | **** |
+ | ** |
+ |** ** |
+ | ***** |
+ | ** |
+ | ** |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x18,
+0x18,
+0x7c,
+0xc6,
+0xc0,
+0x78,
+0x3c,
+0x06,
+0xc6,
+0x7c,
+0x18,
+0x18,
+0x00,
+0x00,
+
+/* Character % (0x25):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | ** * |
+ | ** ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** ** |
+ |** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x62,
+0x66,
+0x0c,
+0x18,
+0x30,
+0x66,
+0xc6,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character & (0x26):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | *** |
+ | ** ** |
+ | *** |
+ | ** |
+ | *** ** |
+ | ****** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | *** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x38,
+0x6c,
+0x38,
+0x30,
+0x76,
+0x7e,
+0xcc,
+0xcc,
+0xcc,
+0x76,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character ' (0x27):
+ ht=16, width=8
+ +--------+
+ | |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x0c,
+0x0c,
+0x0c,
+0x18,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character ( (0x28):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x0c,
+0x18,
+0x30,
+0x30,
+0x30,
+0x30,
+0x30,
+0x30,
+0x18,
+0x0c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character ) (0x29):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x30,
+0x18,
+0x0c,
+0x0c,
+0x0c,
+0x0c,
+0x0c,
+0x0c,
+0x18,
+0x30,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character * (0x2a):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | ** ** |
+ | *** |
+ |******* |
+ | *** |
+ | ** ** |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x6c,
+0x38,
+0xfe,
+0x38,
+0x6c,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character + (0x2b):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | ** |
+ | ** |
+ | ****** |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x18,
+0x18,
+0x7e,
+0x18,
+0x18,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character , (0x2c):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x0c,
+0x0c,
+0x0c,
+0x18,
+0x00,
+0x00,
+0x00,
+
+/* Character - (0x2d):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ |******* |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0xfe,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character . (0x2e):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x18,
+0x18,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character / (0x2f):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | * |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ |** |
+ |* |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x02,
+0x06,
+0x0c,
+0x18,
+0x30,
+0x60,
+0xc0,
+0x80,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character 0 (0x30):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** ** |
+ |** *** |
+ |** **** |
+ |**** ** |
+ |*** ** |
+ |** ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc6,
+0xce,
+0xde,
+0xf6,
+0xe6,
+0xc6,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character 1 (0x31):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ** |
+ | **** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ****** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x18,
+0x78,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x7e,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character 2 (0x32):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ |** ** |
+ |******* |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc6,
+0x06,
+0x0c,
+0x18,
+0x30,
+0x60,
+0xc6,
+0xfe,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character 3 (0x33):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ |** ** |
+ | ** |
+ | ** |
+ | **** |
+ | ** |
+ | ** |
+ | ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0xc6,
+0x06,
+0x06,
+0x3c,
+0x06,
+0x06,
+0x06,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character 4 (0x34):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ** |
+ | *** |
+ | **** |
+ | ** ** |
+ |** ** |
+ |** ** |
+ |******* |
+ | ** |
+ | ** |
+ | **** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x0c,
+0x1c,
+0x3c,
+0x6c,
+0xcc,
+0xcc,
+0xfe,
+0x0c,
+0x0c,
+0x1e,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character 5 (0x35):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |******* |
+ |** |
+ |** |
+ |** |
+ |****** |
+ | ** |
+ | ** |
+ | ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xfe,
+0xc0,
+0xc0,
+0xc0,
+0xfc,
+0x06,
+0x06,
+0x06,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character 6 (0x36):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** |
+ |** |
+ |****** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc0,
+0xc0,
+0xfc,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character 7 (0x37):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |******* |
+ |** ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xfe,
+0xc6,
+0x06,
+0x0c,
+0x18,
+0x30,
+0x30,
+0x30,
+0x30,
+0x30,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character 8 (0x38):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | ***** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc6,
+0xc6,
+0x7c,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character 9 (0x39):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | ****** |
+ | ** |
+ | ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0x7e,
+0x06,
+0x06,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character : (0x3a):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | ** |
+ | ** |
+ | |
+ | |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x0c,
+0x0c,
+0x00,
+0x00,
+0x0c,
+0x0c,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character ; (0x3b):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | ** |
+ | ** |
+ | |
+ | |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x0c,
+0x0c,
+0x00,
+0x00,
+0x0c,
+0x0c,
+0x0c,
+0x18,
+0x00,
+0x00,
+0x00,
+
+/* Character < (0x3c):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ |** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x0c,
+0x18,
+0x30,
+0x60,
+0xc0,
+0x60,
+0x30,
+0x18,
+0x0c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character = (0x3d):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ |******* |
+ | |
+ |******* |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0xfe,
+0x00,
+0xfe,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character > (0x3e):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x60,
+0x30,
+0x18,
+0x0c,
+0x06,
+0x0c,
+0x18,
+0x30,
+0x60,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character ? (0x3f):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc6,
+0x0c,
+0x18,
+0x18,
+0x18,
+0x00,
+0x18,
+0x18,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character @ (0x40):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** **** |
+ |** **** |
+ |** **** |
+ |** *** |
+ |** |
+ | ****** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc6,
+0xc6,
+0xde,
+0xde,
+0xde,
+0xdc,
+0xc0,
+0x7e,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character A (0x41):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | *** |
+ | ** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |******* |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x38,
+0x6c,
+0xc6,
+0xc6,
+0xc6,
+0xfe,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character B (0x42):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |****** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ***** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ |****** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xfc,
+0x66,
+0x66,
+0x66,
+0x7c,
+0x66,
+0x66,
+0x66,
+0x66,
+0xfc,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character C (0x43):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | **** |
+ | ** ** |
+ |** * |
+ |** |
+ |** |
+ |** |
+ |** |
+ |** * |
+ | ** ** |
+ | **** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x3c,
+0x66,
+0xc2,
+0xc0,
+0xc0,
+0xc0,
+0xc0,
+0xc2,
+0x66,
+0x3c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character D (0x44):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |***** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ |***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xf8,
+0x6c,
+0x66,
+0x66,
+0x66,
+0x66,
+0x66,
+0x66,
+0x6c,
+0xf8,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character E (0x45):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |******* |
+ | ** ** |
+ | ** |
+ | ** * |
+ | ***** |
+ | ** * |
+ | ** |
+ | ** |
+ | ** ** |
+ |******* |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xfe,
+0x66,
+0x60,
+0x64,
+0x7c,
+0x64,
+0x60,
+0x60,
+0x66,
+0xfe,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character F (0x46):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |******* |
+ | ** ** |
+ | ** |
+ | ** * |
+ | ***** |
+ | ** * |
+ | ** |
+ | ** |
+ | ** |
+ |**** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xfe,
+0x66,
+0x60,
+0x64,
+0x7c,
+0x64,
+0x60,
+0x60,
+0x60,
+0xf0,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character G (0x47):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** ** |
+ |** |
+ |** |
+ |** |
+ |** *** |
+ |** ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc6,
+0xc0,
+0xc0,
+0xc0,
+0xce,
+0xc6,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character H (0x48):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |******* |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xfe,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character I (0x49):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | **** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | **** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x3c,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x3c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character J (0x4a):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | **** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ |** ** |
+ |** ** |
+ | *** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x3c,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0xd8,
+0xd8,
+0x70,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character K (0x4b):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |**** |
+ |**** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xc6,
+0xc6,
+0xcc,
+0xd8,
+0xf0,
+0xf0,
+0xd8,
+0xcc,
+0xc6,
+0xc6,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character L (0x4c):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |**** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** * |
+ | ** ** |
+ |******* |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xf0,
+0x60,
+0x60,
+0x60,
+0x60,
+0x60,
+0x60,
+0x62,
+0x66,
+0xfe,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character M (0x4d):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |** ** |
+ |** ** |
+ |*** *** |
+ |*** *** |
+ |******* |
+ |** * ** |
+ |** * ** |
+ |** * ** |
+ |** ** |
+ |** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xc6,
+0xc6,
+0xee,
+0xee,
+0xfe,
+0xd6,
+0xd6,
+0xd6,
+0xc6,
+0xc6,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character N (0x4e):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |** ** |
+ |** ** |
+ |*** ** |
+ |*** ** |
+ |**** ** |
+ |** **** |
+ |** *** |
+ |** *** |
+ |** ** |
+ |** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xc6,
+0xc6,
+0xe6,
+0xe6,
+0xf6,
+0xde,
+0xce,
+0xce,
+0xc6,
+0xc6,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character O (0x4f):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character P (0x50):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |****** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ***** |
+ | ** |
+ | ** |
+ | ** |
+ |**** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xfc,
+0x66,
+0x66,
+0x66,
+0x66,
+0x7c,
+0x60,
+0x60,
+0x60,
+0xf0,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character Q (0x51):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** * ** |
+ |** * ** |
+ | ***** |
+ | ** |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xd6,
+0xd6,
+0x7c,
+0x06,
+0x00,
+0x00,
+0x00,
+
+/* Character R (0x52):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |****** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ***** |
+ | **** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ |*** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xfc,
+0x66,
+0x66,
+0x66,
+0x7c,
+0x78,
+0x6c,
+0x66,
+0x66,
+0xe6,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character S (0x53):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** |
+ |** |
+ | *** |
+ | *** |
+ | ** |
+ | ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc0,
+0xc0,
+0x70,
+0x1c,
+0x06,
+0x06,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character T (0x54):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ****** |
+ | * ** * |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | **** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7e,
+0x5a,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x3c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character U (0x55):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character V (0x56):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | ** ** |
+ | *** |
+ | * |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0x6c,
+0x38,
+0x10,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character W (0x57):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** * ** |
+ |** * ** |
+ |** * ** |
+ |******* |
+ |*** *** |
+ |** ** |
+ |** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xc6,
+0xc6,
+0xc6,
+0xd6,
+0xd6,
+0xd6,
+0xfe,
+0xee,
+0xc6,
+0xc6,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character X (0x58):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |** ** |
+ |** ** |
+ |** ** |
+ | ** ** |
+ | *** |
+ | *** |
+ | ** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xc6,
+0xc6,
+0xc6,
+0x6c,
+0x38,
+0x38,
+0x6c,
+0xc6,
+0xc6,
+0xc6,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character Y (0x59):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | **** |
+ | ** |
+ | ** |
+ | ** |
+ | **** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x66,
+0x66,
+0x66,
+0x66,
+0x66,
+0x3c,
+0x18,
+0x18,
+0x18,
+0x3c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character Z (0x5a):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |******* |
+ |** ** |
+ |* ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ |** * |
+ |** ** |
+ |******* |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xfe,
+0xc6,
+0x86,
+0x0c,
+0x18,
+0x30,
+0x60,
+0xc2,
+0xc6,
+0xfe,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character [ (0x5b):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0x60,
+0x60,
+0x60,
+0x60,
+0x60,
+0x60,
+0x60,
+0x60,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character \ (0x5c):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ |* |
+ |** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | * |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x80,
+0xc0,
+0x60,
+0x30,
+0x18,
+0x0c,
+0x06,
+0x02,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character ] (0x5d):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ***** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x7c,
+0x0c,
+0x0c,
+0x0c,
+0x0c,
+0x0c,
+0x0c,
+0x0c,
+0x0c,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character ^ (0x5e):
+ ht=16, width=8
+ +--------+
+ | |
+ | * |
+ | *** |
+ | ** ** |
+ |** ** |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x10,
+0x38,
+0x6c,
+0xc6,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character _ (0x5f):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ |********|
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0xff,
+0x00,
+0x00,
+
+/* Character ` (0x60):
+ ht=16, width=8
+ +--------+
+ | |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x18,
+0x18,
+0x18,
+0x0c,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character a (0x61):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | **** |
+ | ** |
+ | ***** |
+ |** ** |
+ |** ** |
+ |** *** |
+ | *** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x78,
+0x0c,
+0x7c,
+0xcc,
+0xcc,
+0xdc,
+0x76,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character b (0x62):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |*** |
+ | ** |
+ | ** |
+ | ***** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ |****** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xe0,
+0x60,
+0x60,
+0x7c,
+0x66,
+0x66,
+0x66,
+0x66,
+0x66,
+0xfc,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character c (0x63):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** |
+ |** |
+ |** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc0,
+0xc0,
+0xc0,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character d (0x64):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | *** |
+ | ** |
+ | ** |
+ | ***** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | ****** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x1c,
+0x0c,
+0x0c,
+0x7c,
+0xcc,
+0xcc,
+0xcc,
+0xcc,
+0xcc,
+0x7e,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character e (0x65):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** ** |
+ |******* |
+ |** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc6,
+0xfe,
+0xc0,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character f (0x66):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | *** |
+ | ** ** |
+ | ** |
+ | ** |
+ |****** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | **** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x1c,
+0x36,
+0x30,
+0x30,
+0xfc,
+0x30,
+0x30,
+0x30,
+0x30,
+0x78,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character g (0x67):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | *** ** |
+ |** *** |
+ |** ** |
+ |** ** |
+ |** *** |
+ | *** ** |
+ | ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x76,
+0xce,
+0xc6,
+0xc6,
+0xce,
+0x76,
+0x06,
+0xc6,
+0x7c,
+0x00,
+0x00,
+
+/* Character h (0x68):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |*** |
+ | ** |
+ | ** |
+ | ***** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ |*** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xe0,
+0x60,
+0x60,
+0x7c,
+0x66,
+0x66,
+0x66,
+0x66,
+0x66,
+0xe6,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character i (0x69):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ** |
+ | ** |
+ | |
+ | *** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | **** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x18,
+0x18,
+0x00,
+0x38,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x3c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character j (0x6a):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ** |
+ | ** |
+ | |
+ | *** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ |** ** |
+ |** ** |
+ | **** |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x0c,
+0x0c,
+0x00,
+0x1c,
+0x0c,
+0x0c,
+0x0c,
+0x0c,
+0x0c,
+0xcc,
+0xcc,
+0x78,
+0x00,
+0x00,
+
+/* Character k (0x6b):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ |*** |
+ | ** |
+ | ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | **** |
+ | ** ** |
+ | ** ** |
+ |*** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0xe0,
+0x60,
+0x60,
+0x66,
+0x66,
+0x6c,
+0x78,
+0x6c,
+0x66,
+0xe6,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character l (0x6c):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | *** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x1c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character m (0x6d):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | ** ** |
+ |******* |
+ |** * ** |
+ |** * ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x6c,
+0xfe,
+0xd6,
+0xd6,
+0xc6,
+0xc6,
+0xc6,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character n (0x6e):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ |** *** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0xdc,
+0x66,
+0x66,
+0x66,
+0x66,
+0x66,
+0x66,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character o (0x6f):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character p (0x70):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ |** *** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ** ** |
+ | ***** |
+ | ** |
+ | ** |
+ |**** |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0xdc,
+0x66,
+0x66,
+0x66,
+0x66,
+0x7c,
+0x60,
+0x60,
+0xf0,
+0x00,
+0x00,
+
+/* Character q (0x71):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | *** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | ***** |
+ | ** |
+ | ** |
+ | **** |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x76,
+0xcc,
+0xcc,
+0xcc,
+0xcc,
+0x7c,
+0x0c,
+0x0c,
+0x1e,
+0x00,
+0x00,
+
+/* Character r (0x72):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ |** *** |
+ | ** ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ |**** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0xdc,
+0x66,
+0x60,
+0x60,
+0x60,
+0x60,
+0xf0,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character s (0x73):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | ***** |
+ |** ** |
+ |** |
+ | ***** |
+ | ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x7c,
+0xc6,
+0xc0,
+0x7c,
+0x06,
+0xc6,
+0x7c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character t (0x74):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ** |
+ | ** |
+ | ** |
+ |****** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** ** |
+ | *** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x30,
+0x30,
+0x30,
+0xfc,
+0x30,
+0x30,
+0x30,
+0x30,
+0x36,
+0x1c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character u (0x75):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | *** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0xcc,
+0xcc,
+0xcc,
+0xcc,
+0xcc,
+0xcc,
+0x76,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character v (0x76):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ | ** ** |
+ | *** |
+ | * |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0x6c,
+0x38,
+0x10,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character w (0x77):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ |** ** |
+ |** ** |
+ |** * ** |
+ |** * ** |
+ |** * ** |
+ |******* |
+ | ** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0xc6,
+0xc6,
+0xd6,
+0xd6,
+0xd6,
+0xfe,
+0x6c,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character x (0x78):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ |** ** |
+ |** ** |
+ | ** ** |
+ | *** |
+ | ** ** |
+ |** ** |
+ |** ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0xc6,
+0xc6,
+0x6c,
+0x38,
+0x6c,
+0xc6,
+0xc6,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character y (0x79):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** ** |
+ |** *** |
+ | *** ** |
+ | ** |
+ |** ** |
+ | ***** |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0xc6,
+0xc6,
+0xc6,
+0xc6,
+0xce,
+0x76,
+0x06,
+0xc6,
+0x7c,
+0x00,
+0x00,
+
+/* Character z (0x7a):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ |******* |
+ |* ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** * |
+ |******* |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0xfe,
+0x86,
+0x0c,
+0x18,
+0x30,
+0x62,
+0xfe,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character { (0x7b):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | *** |
+ | ** |
+ | ** |
+ | ** |
+ | *** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | *** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x0e,
+0x18,
+0x18,
+0x18,
+0x70,
+0x18,
+0x18,
+0x18,
+0x18,
+0x0e,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character | (0x7c):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x18,
+0x18,
+0x18,
+0x18,
+0x00,
+0x18,
+0x18,
+0x18,
+0x18,
+0x18,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character } (0x7d):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | *** |
+ | ** |
+ | ** |
+ | ** |
+ | *** |
+ | ** |
+ | ** |
+ | ** |
+ | ** |
+ | *** |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x70,
+0x18,
+0x18,
+0x18,
+0x0e,
+0x18,
+0x18,
+0x18,
+0x18,
+0x70,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character ~ (0x7e):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | *** ** |
+ |** *** |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x76,
+0xdc,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+
+/* Character  (0x7f):
+ ht=16, width=8
+ +--------+
+ | |
+ | |
+ | |
+ | |
+ | |
+ | * |
+ | *** |
+ | *** |
+ | ** ** |
+ | ** ** |
+ |******* |
+ | |
+ | |
+ | |
+ | |
+ | |
+ +--------+ */
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x10,
+0x38,
+0x38,
+0x6c,
+0x6c,
+0xfe,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+
+};
diff --git a/c/src/lib/libbsp/arm/csb337/console/sed1356.c b/c/src/lib/libbsp/arm/csb337/console/sed1356.c
new file mode 100644
index 0000000000..84971cf0ef
--- /dev/null
+++ b/c/src/lib/libbsp/arm/csb337/console/sed1356.c
@@ -0,0 +1,459 @@
+/*
+ * SED1356 Support
+ *
+ * Based upon code from MicroMonitor 1.17 from http://www.umonfw.com/
+ * which includes this notice:
+ *
+ **************************************************************************
+ * General notice:
+ * This code is part of a boot-monitor package developed as a generic base
+ * platform for embedded system designs. As such, it is likely to be
+ * distributed to various projects beyond the control of the original
+ * author. Please notify the author of any enhancements made or bugs found
+ * so that all may benefit from the changes. In addition, notification back
+ * to the author will allow the new user to pick up changes that may have
+ * been made by other users after this version of the code was distributed.
+ *
+ * Note1: the majority of this code was edited with 4-space tabs.
+ * Note2: as more and more contributions are accepted, the term "author"
+ * is becoming a mis-representation of credit.
+ *
+ * Original author: Ed Sutter
+ * Email: esutter@alcatel-lucent.com
+ * Phone: 908-582-2351
+ **************************************************************************
+ *
+ * Ed Sutter has been informed that this code is being used in RTEMS.
+ *
+ * The code has been reformatted to be more compliant with RTEMS
+ * coding standards and to eliminate C++ style comments.
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "sed1356.h"
+#include "font8x16.h"
+
+int mode900lq;
+long PIXELS_PER_ROW;
+long PIXELS_PER_COL;
+long COLS_PER_SCREEN;
+long ROWS_PER_SCREEN;
+long SED_HOR_PULSE_WIDTH_LCD;
+long SED_VER_PULSE_START_LCD;
+long SED_HOR_PULSE_START_LCD;
+long SED_HOR_NONDISP_LCD;
+long SED_VER_NONDISP_LCD;
+long SED_VER_PULSE_WIDTH_LCD;
+
+/* globals to keep track of foreground, background colors and x,y position */
+int sed_color_depth; /* 4, 8 or 16 */
+int sed_fg_color; /* 0 to 15, used as lookup into VGA color table */
+int sed_bg_color; /* 0 to 15, used as lookup into VGA color table */
+int sed_col; /* current column, 0 to COLS_PER_SCREEN - 1 */
+int sed_row; /* current row, 0 to (ROWS_PER_SCREEN * 2) - 1 */
+int sed_disp_mode_crt; /* CRT=1, LCD=0 */
+int sed135x_ok;
+int sed135x_tst;
+uint32_t sed_fb_offset; /* current offset into frame buffer for sed_putchar */
+
+void sed_writechar(uint8_t c);
+void sed_scroll(void);
+
+#define SED_REG_BASE 0x30000000 /* *CS2 */
+#define SED_MEM_BASE (SED_REG_BASE + 0x00200000)
+#define SED_STEP 1 /* 16-bit port on 16-bit boundry */
+
+#define SED_REG16(_x_) *(volatile uint16_t *)((uint32_t)SED_REG_BASE + (((uint32_t)_x_ * SED_STEP) ^ 0)) /* Control/Status Registers, 16-bit mode */
+#define RD_FB16(_reg_,_val_) ((_val_) = *((volatile uint16_t *)(((uint32_t)SED_MEM_BASE + ((uint32_t)(_reg_ * SED_STEP) ^ 0)))))
+#define WR_FB16(_reg_,_val_) (*((volatile uint16_t *)(((uint32_t)SED_MEM_BASE + ((uint32_t)(_reg_ * SED_STEP) ^ 0)))) = (_val_))
+
+#if 0
+#define SED1356_REG_LCD_HOR_DISP SED_REG16(0x32)
+#define SED1356_REG_LCD_HOR_NONDISP_and_START SED_REG16(0x34)
+#define SED1356_REG_LCD_HOR_PULSE SED_REG16(0x36)
+#define SED1356_REG_LCD_VER_DISP_HT_LO_and_HI SED_REG16(0x38)
+#define SED1356_REG_LCD_VER_NONDISP_and_START SED_REG16(0x3a)
+#define SED1356_REG_LCD_VER_PULSE SED_REG16(0x3c)
+#define SED1356_REG_LCD_DISP_MODE_and_MISC SED_REG16(0x40)
+#define SED1356_REG_LCD_DISP_START_LO_and_MID SED_REG16(0x42)
+#define SED1356_REG_LCD_DISP_START_HI SED_REG16(0x44)
+#define SED1356_REG_LCD_ADD_OFFSET_LO_and_HI SED_REG16(0x46)
+#define SED1356_REG_LCD_PIXEL_PAN SED_REG16(0x48)
+#define SED1356_REG_LCD_FIFO_THRESH_LO_and_HI SED_REG16(0x4a)
+#endif
+
+
+#define H2SED(_x_) (_x_)
+
+#define FB_SIZE (640 * 480)
+#define SED_ROW_SIZE(_depth_) ((PIXELS_PER_ROW * _depth_) / 8)
+#define SED_FB_SIZE(_depth_) (((PIXELS_PER_COL * PIXELS_PER_ROW) * _depth_) / 8)
+
+#define FONT_WIDTH 8
+#define FONT_HEIGHT 16
+
+#define SED_GET_ADD(_row_, _col_, _depth_) \
+ (((((_row_ * PIXELS_PER_ROW) * FONT_HEIGHT) \
+ + (_col_ * FONT_WIDTH)) \
+ * _depth_) / 8)
+
+
+#define SED_GET_PHYS_ADD(_reg_) \
+ (volatile unsigned long)(SED_MEM_BASE + ((_reg_ * SED_STEP) ^ 0))
+
+
+#include "sed1356_16bit.h"
+
+/* #define SED_DBG */
+int sed135x_tst = 0;
+
+void sed_write_frame_buffer(
+ uint32_t i,
+ uint16_t wr16
+)
+{
+ WR_FB16(i, wr16);
+}
+
+int sed_frame_buffer_size(void)
+{
+ return SED_FB_SIZE(sed_color_depth);
+}
+
+void sed_clr_row(int char_row)
+{
+ unsigned long sed_mem_add;
+ int i;
+ uint16_t wr16;
+
+ /* clear the desired row */
+ sed_mem_add = SED_GET_ADD(char_row, 0, sed_color_depth);
+
+#ifdef SED_DBG
+ sed135x_tst = 1;
+ printf("SED Clear Row %d, FB Add 0x%08lx, CPU Add 0x%08lx.\n ", char_row, sed_mem_add, SED_GET_PHYS_ADD(sed_mem_add));
+ sed135x_tst = 0;
+#endif
+
+ switch (sed_color_depth)
+ {
+ case 4:
+ wr16 = ((sed_bg_color << 12) | (sed_bg_color << 8) | (sed_bg_color << 4) | (sed_bg_color << 0));
+#ifdef SED_DBG
+ sed135x_tst = 1;
+ printf("SED Clear Row %d, FB Add 0x%08lx to 0x%08lx.\n ", char_row, sed_mem_add, sed_mem_add + ((PIXELS_PER_ROW * FONT_HEIGHT) / 2));
+ sed135x_tst = 0;
+#endif
+ for (i = 0; i < ((PIXELS_PER_ROW * FONT_HEIGHT) / 2); i += 2){
+ WR_FB16(sed_mem_add, wr16);
+ sed_mem_add += 2;
+ } /* for font_row */
+ break;
+ case 8:
+ wr16 = ((sed_bg_color << 8) | (sed_bg_color << 0));
+ for (i = 0; i < (PIXELS_PER_ROW * FONT_HEIGHT); i += 2){
+ WR_FB16(sed_mem_add, wr16);
+ sed_mem_add += 2;
+ } /* for font_row */
+ break;
+ case 16:
+ wr16 = ((vga_lookup[sed_bg_color]));
+ for (i = 0; i < ((PIXELS_PER_ROW * FONT_HEIGHT) * 2); i += 2){
+ WR_FB16(sed_mem_add, wr16);
+ sed_mem_add += 2;
+ } /* for font_row */
+ break;
+ } /* switch sed_color_depth */
+} /* sed_clr_row */
+
+void sed_init(void)
+{
+ mode900lq = 0;
+ PIXELS_PER_ROW = 640;
+ PIXELS_PER_COL = 480;
+ COLS_PER_SCREEN = 80;
+ ROWS_PER_SCREEN = 30;
+ SED_HOR_PULSE_WIDTH_LCD = 0x0b;
+ SED_HOR_NONDISP_LCD = 0x13;
+ SED_VER_PULSE_WIDTH_LCD = 0x01;
+ SED_VER_PULSE_START_LCD = 0x09;
+ SED_VER_NONDISP_LCD = 0x2c;
+
+ sed_color_depth = 16; /* 16 => vga lookup */
+ sed_fg_color = 14; /* Bright Yellow */
+ sed_bg_color = 1; /* Blue */
+ sed_disp_mode_crt = 0; /* default to LCD */
+ sed_fb_offset = 0x00;
+ sed_row = 0;
+ sed_col = 0;
+
+ sed135x_ok = 1;
+ sed135x_tst = 0;
+ sed_clearscreen();
+}
+
+/*
+ * sed_putchar()
+ *
+ * This routine parses the character and calls sed_writechar if it is a
+ * printable character
+ */
+void sed_putchar(char c)
+{
+
+ if ((sed135x_ok == 0) || (sed135x_tst == 1)) return;
+
+ /* First parse the character to see if it printable or an
+ * acceptable control character.
+ */
+ switch (c) {
+ case '\r':
+ sed_col = 0;
+ return;
+ case '\n':
+ sed_col = 0;
+ sed_scroll();
+ return;
+ case '\b':
+ sed_col--;
+ if (sed_col < 0) {
+ sed_row--;
+ if (sed_row < 0)
+ sed_row = 0;
+ sed_col = COLS_PER_SCREEN - 1;
+ }
+ c = 0; /* erase the character */
+ sed_writechar(c);
+ break;
+ default:
+ if (((uint8_t)c < FIRST_CHAR) || ((uint8_t)c > LAST_CHAR))
+ return; /* drop anything we can't print */
+ c -= FIRST_CHAR; /* get aligned to the first printable character */
+ sed_writechar(c);
+ /* advance to next column */
+ sed_col++;
+ if (sed_col == COLS_PER_SCREEN) {
+ sed_col = 0;
+ sed_scroll();
+ }
+ break;
+ }
+
+} /* sed_putchar() */
+
+/*
+ * sed_writechar()
+ *
+ * This routine writes the character to the screen at the current cursor
+ * location.
+ */
+void sed_writechar(uint8_t c)
+{
+ uint32_t sed_mem_add;
+ int font_row, font_col;
+ uint8_t font_data8;
+ uint16_t wr16;
+
+ /* Convert the current row,col and color depth values
+ * into an address
+ */
+ sed_mem_add = SED_GET_ADD(sed_row, sed_col, sed_color_depth);
+
+#ifdef SED_DBG
+ sed135x_tst = 1;
+ printf("SED writechar at row %d, col %d, FB Add 0x%08lx, CPU Add 0x%08lx.\n ", sed_row, sed_col, sed_mem_add, SED_GET_PHYS_ADD(sed_mem_add));
+ sed135x_tst = 0;
+#endif
+
+ if (FONT_WIDTH == 8) {
+ switch (sed_color_depth) {
+ case 4:
+ /* Now render the font by painting one font row at a time */
+ for (font_row = 0; font_row < FONT_HEIGHT; font_row++) {
+ /* get the font row of data */
+ font_data8 = font8x16[(c * FONT_HEIGHT) + font_row];
+
+
+ for (font_col = 0; font_col < 8; font_col += 4)
+ {
+ /* get a words worth of pixels */
+ wr16 = (((font_data8 & 0x80) ? sed_fg_color << 12 : sed_bg_color << 12)
+ | ((font_data8 & 0x40) ? sed_fg_color << 8 : sed_bg_color << 8)
+ | ((font_data8 & 0x20) ? sed_fg_color << 4 : sed_bg_color << 4)
+ | ((font_data8 & 0x10) ? sed_fg_color << 0 : sed_bg_color << 0));
+ font_data8 = font_data8 << 4;
+ WR_FB16(sed_mem_add, wr16);
+ /* if we are in the 2nd frame buffer, write to the 1st
+ * frame buffer also
+ */
+ if (sed_row > (ROWS_PER_SCREEN - 1)) {
+ WR_FB16((sed_mem_add - SED_FB_SIZE(sed_color_depth)), wr16);
+ }
+ sed_mem_add += 2;
+ } /* for font_col */
+ /* go to the next pixel row */
+ sed_mem_add += (SED_ROW_SIZE(sed_color_depth) - ((FONT_WIDTH * sed_color_depth) / 8));
+ } /* for font_row */
+ break;
+
+ case 8:
+ /* Now render the font by painting one font row at a time */
+ for (font_row = 0; font_row < FONT_HEIGHT; font_row++) {
+ /* get the font row of data */
+ font_data8 = font8x16[(c * FONT_HEIGHT) + font_row];
+ for (font_col = 0; font_col < 8; font_col += 2)
+ {
+ /* get a words worth of pixels */
+ wr16 = (((font_data8 & 0x80) ? sed_fg_color << 8 : sed_bg_color << 8)
+ | ((font_data8 & 0x40) ? sed_fg_color << 0 : sed_bg_color << 0));
+ font_data8 = font_data8 << 2;
+ WR_FB16(sed_mem_add, wr16);
+ /* if we are in the 2nd frame buffer, write to the 1st
+ * frame buffer also
+ */
+ if (sed_row > (ROWS_PER_SCREEN - 1)) {
+ WR_FB16((sed_mem_add - SED_FB_SIZE(sed_color_depth)), wr16);
+ }
+ sed_mem_add += 2;
+ } /* for font_col */
+ /* go to the next pixel row */
+ sed_mem_add += (SED_ROW_SIZE(sed_color_depth) - ((FONT_WIDTH * sed_color_depth) / 8));
+ } /* for font_row */
+ break;
+
+ case 16:
+ /* Now render the font by painting one font row at a time */
+ for (font_row = 0; font_row < FONT_HEIGHT; font_row++) {
+ /* get the font row of data */
+ font_data8 = font8x16[(c * FONT_HEIGHT) + font_row];
+ for (font_col = 0; font_col < 8; font_col++)
+ {
+ /* get a words worth of pixels */
+ wr16 = ((font_data8 & 0x80) ?
+ vga_lookup[sed_fg_color] : vga_lookup[sed_bg_color]);
+ font_data8 = font_data8 << 1;
+ WR_FB16(sed_mem_add, wr16);
+ /* if we are in the 2nd frame buffer, write to the 1st
+ * frame buffer also.
+ */
+ if (sed_row > (ROWS_PER_SCREEN - 1)) {
+ WR_FB16((sed_mem_add - SED_FB_SIZE(sed_color_depth)), wr16);
+ }
+ sed_mem_add += 2;
+ } /* for font_col */
+ /* go to the next pixel row */
+ sed_mem_add += (SED_ROW_SIZE(sed_color_depth) - ((FONT_WIDTH * sed_color_depth) / 8));
+ } /* for font_row */
+ break;
+
+ } /* switch sed_color depth */
+ } /* FONT_WIDTH == 8 */
+ else
+ {
+ return;
+ }
+} /* sed_writechar() */
+
+void sed_update_fb_offset(void)
+{
+ /* write the new sed_fb_offset value */
+ if (sed_disp_mode_crt) {
+ /* before we change the address offset, wait for the display to
+ * go from active to non-active, unless the display is not enabled
+ */
+ if (SED1356_REG_DISP_MODE & H2SED(SED1356_DISP_MODE_CRT)) { /* CRT is on */
+ while ((SED1356_REG_CRT_VER_NONDISP_and_START & H2SED(SED1356_VER_NONDISP)) == 0) {}
+ while ((SED1356_REG_CRT_VER_NONDISP_and_START & H2SED(SED1356_VER_NONDISP)) == 1) {}
+ }
+ SED1356_REG_CRT_DISP_START_LO_and_MID = H2SED(((sed_fb_offset & 0x00ffff) >> 0));
+ SED1356_REG_CRT_DISP_START_HI = H2SED(((sed_fb_offset & 0x070000) >> 16));
+ }
+ else /* LCD */
+ {
+ if (SED1356_REG_DISP_MODE & H2SED(SED1356_DISP_MODE_LCD)) { /* LCD is on */
+ while ((SED1356_REG_LCD_VER_NONDISP_and_START & H2SED(SED1356_VER_NONDISP)) == 0) {}
+ while ((SED1356_REG_LCD_VER_NONDISP_and_START & H2SED(SED1356_VER_NONDISP)) == 1) {}
+ }
+ SED1356_REG_LCD_DISP_START_LO_and_MID = H2SED(((sed_fb_offset & 0x00ffff) >> 0));
+ SED1356_REG_LCD_DISP_START_HI = H2SED(((sed_fb_offset & 0x070000) >> 16));
+ }
+}
+
+/* sed_scroll()
+ *
+ * Because we are most likely running out of FLASH and probably also with
+ * cache disabled, a brute force memcpy of the whole screen would be very
+ * slow, even with reduced color depths. Instead, we define a frame buffer
+ * that is twice the size of our actual display. This does limit us to a
+ * 1Mbyte active display size, but 640 x 480 @ 16-bits/pixel = 614K so it
+ * works just fine. 800 x 600 can be had by reducing the color depth to
+ * 8-bits/pixel and using the look up tables.
+ *
+ * With the double buffering, we always write to the first buffer, even
+ * when the second buffer is active. This allows us to scroll by adjusting
+ * the starting and ending addresses in the SED135x by one row. When we
+ * reach the end of our virtual buffer, we reset the starting and ending
+ * addresses to the first buffer. Note that we can not adjust the SED135x
+ * registers until it is in vertical retrace. That means we have to wait
+ * until it is in active display, then goes to non-display, unless the
+ * screen is blanked, in which case we can update immediately.
+ */
+void sed_scroll(void)
+{
+ sed_row++;
+
+ /* clear the new row(s) */
+ sed_clr_row(sed_row);
+ if (sed_row > (ROWS_PER_SCREEN - 1)) {
+ sed_clr_row(sed_row - ROWS_PER_SCREEN);
+ }
+ /* when sed_y_pos is greater than ROWS_PER_SCREEN we just adjust the
+ * start and end addresses in the SED135x. If it is equal to 2 *
+ * ROWS_PER_SCREEN, we reset the start and end addresses to SED_MEM_BASE.
+ */
+ if (sed_row > (ROWS_PER_SCREEN - 1)) {
+ if (sed_row > ((ROWS_PER_SCREEN * 2) - 1)) {
+ sed_fb_offset = 0x00;
+ sed_row = 0;
+ sed_clearscreen();
+ } else {
+ /* calculate the new offset address of the frame buffer in words */
+ sed_fb_offset += (SED_GET_ADD(1, 0, sed_color_depth) / 2);
+ }
+ sed_update_fb_offset();
+ } /* if (sed_row > (ROWS_PER_SCREEN - 1)) */
+}
+
+void sed_putstring(char *s)
+{
+ char *p = s;
+ while (*p)
+ sed_putchar(*p++);
+}
+
+void sed_clearscreen(void)
+{
+ int i;
+ uint16_t wr16;
+ int bg = sed_bg_color;
+ int fbsize = sed_frame_buffer_size();
+
+ /* we double buffer so clear ALL of memory */
+ fbsize *= 2;
+
+ /* fill the frame buffer with incrementing color values */
+ switch (sed_color_depth){
+ case 4: wr16 = bg | bg << 4 | bg << 8 | bg << 12; break;
+ case 8: wr16 = bg | bg << 8; break;
+ /* 16-bits bypasses the lookup table */
+ default: wr16 = vga_lookup[bg]; break;
+ }
+ for (i = 0; i < fbsize; i += 2){
+ sed_write_frame_buffer(i, wr16);
+ }
+}
diff --git a/c/src/lib/libbsp/arm/csb337/console/sed1356_16bit.h b/c/src/lib/libbsp/arm/csb337/console/sed1356_16bit.h
new file mode 100755
index 0000000000..241060a4d7
--- /dev/null
+++ b/c/src/lib/libbsp/arm/csb337/console/sed1356_16bit.h
@@ -0,0 +1,547 @@
+/*
+ * sed1356.h: SED1356 LCD/CRT Controllers - 16-Bit access mode
+ *
+ * Based upon code from MicroMonitor 1.17 from http://www.umonfw.com/
+ * which includes this notice:
+ *
+ **************************************************************************
+ * General notice:
+ * This code is part of a boot-monitor package developed as a generic base
+ * platform for embedded system designs. As such, it is likely to be
+ * distributed to various projects beyond the control of the original
+ * author. Please notify the author of any enhancements made or bugs found
+ * so that all may benefit from the changes. In addition, notification back
+ * to the author will allow the new user to pick up changes that may have
+ * been made by other users after this version of the code was distributed.
+ *
+ * Note1: the majority of this code was edited with 4-space tabs.
+ * Note2: as more and more contributions are accepted, the term "author"
+ * is becoming a mis-representation of credit.
+ *
+ * Original author: Ed Sutter
+ * Email: esutter@alcatel-lucent.com
+ * Phone: 908-582-2351
+ **************************************************************************
+ *
+ * Ed Sutter has been informed that this code is being used in RTEMS.
+ *
+ * The code has been reformatted to be more compliant with RTEMS
+ * coding standards and to eliminate C++ style comments.
+ *
+ * $Id$
+ */
+
+#ifndef __sed1356_16bit_h
+#define __sed1356_16bit_h
+
+#include "bits.h"
+/*------------------------------------------------------------------------
+ * cpu specific code must define the following board specific macros.
+ * in cpuio.h. These examples assume the SED135x has been placed in
+ * the correct endian mode via hardware.
+ * #define SED_MEM_BASE 0xf0600000 <-- just example addresses,
+ * #define SED_REG_BASE 0xf0400000 <-- define for each board
+ * #define SED_STEP 1 <-- 1 = device is on 16-bit boundry, 2 = 32-bit boundry, 4 = 64-bit boundry
+ * #define SED_REG16(_x_) *(vushortr *)(SED_REG_BASE + (_x_ * SED_STEP)) // Control/Status Registers
+ * #define RD_FB16(_reg_,_val_) ((_val_) = *((vushort *)((SED_MEM_BASE + (_reg_ * SED_STEP)))))
+ * #define WR_FB16(_reg_,_val_) (*((vushort *)((SED_MEM_BASE + (_reg_ * 2)))) = (_val_))
+ * Big endian processors
+ * #define H2SED(_x_) ((((x) & 0xff00U) >> 8) | (((x) & 0x00ffU) << 8))
+ * Little endian
+ * #define H2SED(_x_) (_x_)
+ *
+ */
+
+/*
+ * SED1356 registers - 16-Bit Access Mode. The first register
+ * referenced is the even addressed register. The byte offsets
+ * of the odd registers are shown in the comments
+ */
+#define SED1356_REG_REV_and_MISC SED_REG16(0x00)
+#define SED1356_REG_GPIO_CFG SED_REG16(0x04)
+#define SED1356_REG_GPIO_CTL SED_REG16(0x08)
+#define SED1356_REG_MD_CFG_RD_LO_and_HI SED_REG16(0x0c)
+#define SED1356_REG_MCLK_CFG SED_REG16(0x10)
+#define SED1356_REG_LCD_PCLK_CFG SED_REG16(0x14)
+#define SED1356_REG_CRT_PCLK_CFG SED_REG16(0x18)
+#define SED1356_REG_MEDIA_PCLK_CFG SED_REG16(0x1c)
+#define SED1356_REG_WAIT_STATE SED_REG16(0x1e)
+#define SED1356_REG_MEM_CFG_and_REF_RATE SED_REG16(0x20)
+#define SED1356_REG_MEM_TMG0_and_1 SED_REG16(0x2a)
+#define SED1356_REG_PANEL_TYPE_and_MOD_RATE SED_REG16(0x30)
+/* LCD Control registers */
+#define SED1356_REG_LCD_HOR_DISP SED_REG16(0x32)
+#define SED1356_REG_LCD_HOR_NONDISP_and_START SED_REG16(0x34)
+#define SED1356_REG_LCD_HOR_PULSE SED_REG16(0x36)
+#define SED1356_REG_LCD_VER_DISP_HT_LO_and_HI SED_REG16(0x38)
+#define SED1356_REG_LCD_VER_NONDISP_and_START SED_REG16(0x3a)
+#define SED1356_REG_LCD_VER_PULSE SED_REG16(0x3c)
+#define SED1356_REG_LCD_DISP_MODE_and_MISC SED_REG16(0x40)
+#define SED1356_REG_LCD_DISP_START_LO_and_MID SED_REG16(0x42)
+#define SED1356_REG_LCD_DISP_START_HI SED_REG16(0x44)
+#define SED1356_REG_LCD_ADD_OFFSET_LO_and_HI SED_REG16(0x46)
+#define SED1356_REG_LCD_PIXEL_PAN SED_REG16(0x48)
+#define SED1356_REG_LCD_FIFO_THRESH_LO_and_HI SED_REG16(0x4a)
+/* CRT/TV Control registers */
+#define SED1356_REG_CRT_HOR_DISP SED_REG16(0x50)
+#define SED1356_REG_CRT_HOR_NONDISP_and_START SED_REG16(0x52)
+#define SED1356_REG_CRT_HOR_PULSE SED_REG16(0x54)
+#define SED1356_REG_CRT_VER_DISP_HT_LO_and_HI SED_REG16(0x56)
+#define SED1356_REG_CRT_VER_NONDISP_and_START SED_REG16(0x58)
+#define SED1356_REG_CRT_VER_PULSE_and_OUT_CTL SED_REG16(0x5a)
+#define SED1356_REG_CRT_DISP_MODE SED_REG16(0x60)
+#define SED1356_REG_CRT_DISP_START_LO_and_MID SED_REG16(0x62)
+#define SED1356_REG_CRT_DISP_START_HI SED_REG16(0x64)
+#define SED1356_REG_CRT_ADD_OFFSET_LO_and_HI SED_REG16(0x66)
+#define SED1356_REG_CRT_PIXEL_PAN SED_REG16(0x68)
+#define SED1356_REG_CRT_FIFO_THRESH_LO_and_HI SED_REG16(0x6a)
+/* LCD Cursor Control Registers */
+#define SED1356_REG_LCD_CURSOR_CTL_and_START_ADD SED_REG16(0x70)
+#define SED1356_REG_LCD_CURSOR_X_POS_LO_and_HI SED_REG16(0x72)
+#define SED1356_REG_LCD_CURSOR_Y_POS_LO_and_HI SED_REG16(0x74)
+#define SED1356_REG_LCD_CURSOR_BLUE_and_GREEN_CLR_0 SED_REG16(0x76)
+#define SED1356_REG_LCD_CURSOR_RED_CLR_0 SED_REG16(0x78)
+#define SED1356_REG_LCD_CURSOR_BLUE_and_GREEN_CLR_1 SED_REG16(0x7a)
+#define SED1356_REG_LCD_CURSOR_RED_CLR_1 SED_REG16(0x7c)
+#define SED1356_REG_LCD_CURSOR_FIFO_THRESH SED_REG16(0x7e)
+/* CRT Cursor Control Registers */
+#define SED1356_REG_CRT_CURSOR_CTL_and_START_ADD SED_REG16(0x80)
+#define SED1356_REG_CRT_CURSOR_X_POS_LO_and_HI SED_REG16(0x82)
+#define SED1356_REG_CRT_CURSOR_Y_POS_LO_and_HI SED_REG16(0x84)
+#define SED1356_REG_CRT_CURSOR_BLUE_and_GREEN_CLR_0 SED_REG16(0x86)
+#define SED1356_REG_CRT_CURSOR_RED_CLR_0 SED_REG16(0x88)
+#define SED1356_REG_CRT_CURSOR_BLUE_and_GREEN_CLR_1 SED_REG16(0x8a)
+#define SED1356_REG_CRT_CURSOR_RED_CLR_1 SED_REG16(0x8c)
+#define SED1356_REG_CRT_CURSOR_FIFO_THRESH SED_REG16(0x8e)
+/* BitBlt Control Registers */
+#define SED1356_REG_BLT_CTL_0_and_1 SED_REG16(0x100)
+#define SED1356_REG_BLT_ROP_CODE_and_BLT_OP SED_REG16(0x102)
+#define SED1356_REG_BLT_SRC_START_LO_and_MID SED_REG16(0x104)
+#define SED1356_REG_BLT_SRC_START_HI SED_REG16(0x106)
+#define SED1356_REG_BLT_DEST_START_LO_and_MID SED_REG16(0x108)
+#define SED1356_REG_BLT_DEST_START_HI SED_REG16(0x10a)
+#define SED1356_REG_BLT_ADD_OFFSET_LO_and_HI SED_REG16(0x10c)
+#define SED1356_REG_BLT_WID_LO_and_HI SED_REG16(0x110)
+#define SED1356_REG_BLT_HGT_LO_and_HI SED_REG16(0x112)
+#define SED1356_REG_BLT_BG_CLR_LO_and_HI SED_REG16(0x114)
+#define SED1356_REG_BLT_FG_CLR_LO_and_HI SED_REG16(0x118)
+/* Look-Up Table Control Registers */
+#define SED1356_REG_LUT_MODE SED_REG16(0x1e0)
+#define SED1356_REG_LUT_ADD SED_REG16(0x1e2)
+#define SED1356_REG_LUT_DATA SED_REG16(0x1e4)
+/* Power and Miscellaneous Control Registers */
+#define SED1356_REG_PWR_CFG_and_STAT SED_REG16(0x1f0)
+#define SED1356_REG_WATCHDOG_CTL SED_REG16(0x1f4)
+#define SED1356_REG_DISP_MODE SED_REG16(0x1fc)
+
+/*
+ * Bit Assignments - Little Endian, Use H2SED() macro to access
+ *
+ * SED1356_REG_REV_and_MISC - even
+ */
+#define SED1356_REV_ID_MASK 0xfc /* ID bits - masks off the rev bits */
+#define SED1356_REV_ID_1356 BIT4
+#define SED1356_REV_ID_1355 BIT3
+
+/* SED1356_REG_REV_and_MISC - odd */
+#define SED1356_MISC_HOST_DIS BIT7 << 8 /* 0 = enable host access, 1 = disable */
+
+/* SED1356_REG_GPIO_CFG and SED1356_REG_GPIO_STAT */
+#define SED1356_GPIO_GPIO3 BIT3 /* 0 = input, 1 = output, if configured as GPIO */
+#define SED1356_GPIO_GPIO2 BIT2
+#define SED1356_GPIO_GPIO1 BIT1
+
+/* SED1356_REG_MCLK_CFG */
+#define SED1356_MCLK_DIV2 BIT4
+#define SED1356_MCLK_SRC_BCLK BIT0
+#define SED1356_MCLK_SRC_CLKI 0x00
+
+/* SED1356_REG_LCD_PCLK_CFG, SED1356_REG_CRT_PCLK_CFG
+ * and SED1356_REG_MEDIA_PCLK_CFG
+ */
+#define SED1356_PCLK_X2 BIT7 /* SED1356_REG_CRT_PCLK_CFG only */
+#define SED1356_PCLK_DIV1 0x00 << 4
+#define SED1356_PCLK_DIV2 0x01 << 4
+#define SED1356_PCLK_DIV3 0x02 << 4
+#define SED1356_PCLK_DIV4 0x03 << 4
+#define SED1356_PCLK_SRC_CLKI 0x00
+#define SED1356_PCLK_SRC_BCLK 0x01
+#define SED1356_PCLK_SRC_CLKI2 0x02
+#define SED1356_PCLK_SRC_MCLK 0x03
+
+/* SED1356_REG_MEM_CFG_and_REF_RATE - even */
+#define SED1356_MEM_CFG_2CAS_EDO 0x00
+#define SED1356_MEM_CFG_2CAS_FPM 0x01
+#define SED1356_MEM_CFG_2WE_EDO 0x02
+#define SED1356_MEM_CFG_2WE_FPM 0x03
+#define SED1356_MEM_CFG_MASK 0x03
+
+/* SED1356_REG_MEM_CFG_and_REF_RATE - odd */
+#define SED1356_REF_TYPE_CBR 0x00 << 6 << 8
+#define SED1356_REF_TYPE_SELF 0x01 << 6 << 8
+#define SED1356_REF_TYPE_NONE 0x02 << 6 << 8
+#define SED1356_REF_TYPE_MASK 0x03 << 6 << 8
+#define SED1356_REF_RATE_64 0x00 << 0 << 8 /* MCLK / 64 */
+#define SED1356_REF_RATE_128 0x01 << 0 << 8 /* MCLK / 128 */
+#define SED1356_REF_RATE_256 0x02 << 0 << 8 /* MCLK / 256 */
+#define SED1356_REF_RATE_512 0x03 << 0 << 8 /* MCLK / 512 */
+#define SED1356_REF_RATE_1024 0x04 << 0 << 8 /* MCLK / 1024 */
+#define SED1356_REF_RATE_2048 0x05 << 0 << 8 /* MCLK / 2048 */
+#define SED1356_REF_RATE_4096 0x06 << 0 << 8 /* MCLK / 4096 */
+#define SED1356_REF_RATE_8192 0x07 << 0 << 8 /* MCLK / 8192 */
+#define SED1356_REF_RATE_MASK 0x07 << 0 << 8 /* MCLK / 8192 */
+
+/* SED1356_REG_MEM_TMG0_and_1 - even */
+#define SED1356_MEM_TMG0_EDO50_MCLK40 0x01
+#define SED1356_MEM_TMG0_EDO50_MCLK33 0x01
+#define SED1356_MEM_TMG0_EDO60_MCLK33 0x01
+#define SED1356_MEM_TMG0_EDO50_MCLK30 0x12
+#define SED1356_MEM_TMG0_EDO60_MCLK30 0x01
+#define SED1356_MEM_TMG0_EDO70_MCLK30 0x00
+#define SED1356_MEM_TMG0_EDO50_MCLK25 0x12
+#define SED1356_MEM_TMG0_EDO60_MCLK25 0x12
+#define SED1356_MEM_TMG0_EDO70_MCLK25 0x01
+#define SED1356_MEM_TMG0_EDO80_MCLK25 0x00
+#define SED1356_MEM_TMG0_EDO50_MCLK20 0x12
+#define SED1356_MEM_TMG0_EDO60_MCLK20 0x12
+#define SED1356_MEM_TMG0_EDO70_MCLK20 0x12
+#define SED1356_MEM_TMG0_EDO80_MCLK20 0x01
+#define SED1356_MEM_TMG0_FPM50_MCLK25 0x12
+#define SED1356_MEM_TMG0_FPM60_MCLK25 0x01
+#define SED1356_MEM_TMG0_FPM50_MCLK20 0x12
+#define SED1356_MEM_TMG0_FPM60_MCLK20 0x12
+#define SED1356_MEM_TMG0_FPM70_MCLK20 0x11
+#define SED1356_MEM_TMG0_FPM80_MCLK20 0x01
+
+/* SED1356_REG_MEM_TMG0_and_1 - odd */
+#define SED1356_MEM_TMG1_EDO50_MCLK40 0x01 << 8
+#define SED1356_MEM_TMG1_EDO50_MCLK33 0x01 << 8
+#define SED1356_MEM_TMG1_EDO60_MCLK33 0x01 << 8
+#define SED1356_MEM_TMG1_EDO50_MCLK30 0x02 << 8
+#define SED1356_MEM_TMG1_EDO60_MCLK30 0x01 << 8
+#define SED1356_MEM_TMG1_EDO70_MCLK30 0x00 << 8
+#define SED1356_MEM_TMG1_EDO50_MCLK25 0x02 << 8
+#define SED1356_MEM_TMG1_EDO60_MCLK25 0x02 << 8
+#define SED1356_MEM_TMG1_EDO70_MCLK25 0x01 << 8
+#define SED1356_MEM_TMG1_EDO80_MCLK25 0x01 << 8
+#define SED1356_MEM_TMG1_EDO50_MCLK20 0x02 << 8
+#define SED1356_MEM_TMG1_EDO60_MCLK20 0x02 << 8
+#define SED1356_MEM_TMG1_EDO70_MCLK20 0x02 << 8
+#define SED1356_MEM_TMG1_EDO80_MCLK20 0x01 << 8
+#define SED1356_MEM_TMG1_FPM50_MCLK25 0x02 << 8
+#define SED1356_MEM_TMG1_FPM60_MCLK25 0x01 << 8
+#define SED1356_MEM_TMG1_FPM50_MCLK20 0x02 << 8
+#define SED1356_MEM_TMG1_FPM60_MCLK20 0x02 << 8
+#define SED1356_MEM_TMG1_FPM70_MCLK20 0x02 << 8
+#define SED1356_MEM_TMG1_FPM80_MCLK20 0x01 << 8
+
+
+/* Bit definitions
+ *
+ * SED1356_REG_PANEL_TYPE_AND_MOD_RATE - even
+ */
+#define SED1356_PANEL_TYPE_EL BIT7
+#define SED1356_PANEL_TYPE_4_9 (0x00 << 4) /* Passive 4-Bit, TFT 9-Bit */
+#define SED1356_PANEL_TYPE_8_12 (0x01 << 4) /* Passive 8-Bit, TFT 12-Bit */
+#define SED1356_PANEL_TYPE_16 (0x02 << 4) /* Passive 16-Bit, or TFT 18-Bit */
+#define SED1356_PANEL_TYPE_MASK (0x03 << 4)
+#define SED1356_PANEL_TYPE_FMT BIT3 /* 0 = Passive Format 1, 1 = Passive Format 2 */
+#define SED1356_PANEL_TYPE_CLR BIT2 /* 0 = Passive Mono, 1 = Passive Color */
+#define SED1356_PANEL_TYPE_DUAL BIT1 /* 0 = Passive Single, 1 = Passive Dual */
+#define SED1356_PANEL_TYPE_TFT BIT0 /* 0 = Passive, 1 = TFT (DUAL, FMT & CLR are don't cares) */
+
+/* SED1356_REG_CRT_HOR_PULSE, SED1356_REG_CRT_VER_PULSE,
+ * SED1356_REG_LCD_HOR_PULSE and SED1356_REG_LCD_VER_PULSE
+ */
+#define SED1356_PULSE_POL_HIGH BIT7 /* 0 = CRT/TFT Pulse is Low, Passive is High, 1 = CRT/TFT Pulse is High, Passive is Low */
+#define SED1356_PULSE_POL_LOW 0x00 /* 0 = CRT/TFT Pulse is Low, Passive is High, 1 = CRT/TFT Pulse is High, Passive is Low */
+#define SED1356_PULSE_WID(_x_) (_x_ & 0x0f) /* Pulse Width in Pixels */
+
+/* SED1356_LCD_DISP_MODE_and_MISC - even */
+#define SED1356_LCD_DISP_BLANK BIT7 /* 1 = Blank LCD Display */
+#define SED1356_LCD_DISP_SWIV_NORM (0x00 << 4) /* Used with SED1356_REG_DISP_MODE Bit 6 */
+#define SED1356_LCD_DISP_SWIV_90 (0x00 << 4)
+#define SED1356_LCD_DISP_SWIV_180 (0x01 << 4)
+#define SED1356_LCD_DISP_SWIV_270 (0x01 << 4)
+#define SED1356_LCD_DISP_SWIV_MASK (0x01 << 4)
+#define SED1356_LCD_DISP_16BPP 0x05 /* Bit Per Pixel Selection */
+#define SED1356_LCD_DISP_15BPP 0x04
+#define SED1356_LCD_DISP_8BPP 0x03
+#define SED1356_LCD_DISP_4BPP 0x02
+#define SED1356_LCD_DISP_BPP_MASK 0x07
+
+/* SED1356_LCD_DISP_MODE_and_MISC - odd */
+#define SED1356_LCD_MISC_DITH BIT1 << 8 /* 1 = Dither Disable, Passive Panel Only */
+#define SED1356_LCD_MISC_DUAL BIT0 << 8 /* 1 = Dual Panel Disable, Passive Panel Only */
+
+/* SED1356_REG_CRT_VER_PULSE_and_OUT_CTL - odd */
+#define SED1356_CRT_OUT_CHROM BIT5 << 8 /* 1 = TV Chrominance Filter Enable */
+#define SED1356_CRT_OUT_LUM BIT4 << 8 /* 1 = TV Luminance Filter Enable */
+#define SED1356_CRT_OUT_DAC_LVL BIT3 << 8 /* 1 = 4.6ma IREF, 0 = 9.2 IREF */
+#define SED1356_CRT_OUT_SVIDEO BIT1 << 8 /* 1 = S-Video Output, 0 = Composite Video Output */
+#define SED1356_CRT_OUT_PAL BIT0 << 8 /* 1 = PAL Format Output, 0 = NTSC Format Output */
+
+/* SED1356_REG_CRT_DISP_MODE */
+#define SED1356_CRT_DISP_BLANK BIT7 /* 1 = Blank CRT Display */
+#define SED1356_CRT_DISP_16BPP 0x05 /* Bit Per Pixel Selection */
+#define SED1356_CRT_DISP_15BPP 0x04
+#define SED1356_CRT_DISP_8BPP 0x03
+#define SED1356_CRT_DISP_4BPP 0x02
+#define SED1356_CRT_DISP_BPP_MASK 0x07
+
+/* SED1356_DISP_MODE */
+#define SED1356_DISP_SWIV_NORM (0x00 << 6) /* Used with SED1356_LCD_DISP_MODE Bit 4 */
+#define SED1356_DISP_SWIV_90 (0x01 << 6)
+#define SED1356_DISP_SWIV_180 (0x00 << 6)
+#define SED1356_DISP_SWIV_270 (0x01 << 6)
+#define SED1356_DISP_MODE_OFF 0x00 /* All Displays Off */
+#define SED1356_DISP_MODE_LCD 0x01 /* LCD Only */
+#define SED1356_DISP_MODE_CRT 0x02 /* CRT Only */
+#define SED1356_DISP_MODE_LCD_CRT 0x03 /* Simultaneous LCD and CRT */
+#define SED1356_DISP_MODE_TV 0x04 /* TV Only, Flicker Filter Off */
+#define SED1356_DISP_MODE_TV_LCD 0x05 /* Simultaneous LCD and TV, Flicker Filter Off */
+#define SED1356_DISP_MODE_TV_FLICK 0x06 /* TV Only, Flicker Filter On */
+#define SED1356_DISP_MODE_TV_LCD_FLICK 0x07 /* Simultaneous LCD and TV, Flicker Filter On */
+
+/* SED1356_REG_PWR_CFG and SED1356_REG_PWR_STAT */
+#define SED1356_PWR_PCLK BIT1 /* SED1356_REG_PWR_STAT only */
+#define SED1356_PWR_MCLK BIT0
+
+/* SED1356_REG_VER_NONDISP */
+#define SED1356_VER_NONDISP BIT7 /* vertical retrace status 1 = in retrace */
+
+/* Display size defines */
+extern long PIXELS_PER_ROW;
+extern long PIXELS_PER_COL;
+#define BYTES_PER_PIXEL 2
+extern long COLS_PER_SCREEN;
+extern long ROWS_PER_SCREEN;
+
+/* 16-bit pixels are RGB 565 - LSB of RED and BLUE are tied low at the */
+/* LCD Interface, while the LSB of GREEN is loaded as 0 */
+#define RED_SUBPIXEL(n) ((n & 0x1f) << 11)
+#define GREEN_SUBPIXEL(n) ((n & 0x1f) << 5)
+#define BLUE_SUBPIXEL(n) ((n & 0x1f) << 0)
+
+/* define a simple VGA style 16-color pallette */
+#if 0
+#define LU_BLACK (RED_SUBPIXEL(0x00) | GREEN_SUBPIXEL(0x00) | BLUE_SUBPIXEL(0x00))
+#define LU_BLUE (RED_SUBPIXEL(0x00) | GREEN_SUBPIXEL(0x00) | BLUE_SUBPIXEL(0x0f))
+#define LU_GREEN (RED_SUBPIXEL(0x00) | GREEN_SUBPIXEL(0x0f) | BLUE_SUBPIXEL(0x00))
+#define LU_CYAN (RED_SUBPIXEL(0x00) | GREEN_SUBPIXEL(0x0f) | BLUE_SUBPIXEL(0x0f))
+#define LU_RED (RED_SUBPIXEL(0x0f) | GREEN_SUBPIXEL(0x00) | BLUE_SUBPIXEL(0x00))
+#define LU_VIOLET (RED_SUBPIXEL(0x0f) | GREEN_SUBPIXEL(0x00) | BLUE_SUBPIXEL(0x0f))
+#define LU_YELLOW (RED_SUBPIXEL(0x0f) | GREEN_SUBPIXEL(0x0f) | BLUE_SUBPIXEL(0x00))
+#define LU_GREY (RED_SUBPIXEL(0x0f) | GREEN_SUBPIXEL(0x0f) | BLUE_SUBPIXEL(0x0f))
+#define LU_WHITE (RED_SUBPIXEL(0x17) | GREEN_SUBPIXEL(0x17) | BLUE_SUBPIXEL(0x17))
+#define LU_BRT_BLUE (RED_SUBPIXEL(0x00) | GREEN_SUBPIXEL(0x00) | BLUE_SUBPIXEL(0x1f))
+#define LU_BRT_GREEN (RED_SUBPIXEL(0x00) | GREEN_SUBPIXEL(0x1f) | BLUE_SUBPIXEL(0x00))
+#define LU_BRT_CYAN (RED_SUBPIXEL(0x00) | GREEN_SUBPIXEL(0x1f) | BLUE_SUBPIXEL(0x1f))
+#define LU_BRT_RED (RED_SUBPIXEL(0x1f) | GREEN_SUBPIXEL(0x00) | BLUE_SUBPIXEL(0x00))
+#define LU_BRT_VIOLET (RED_SUBPIXEL(0x1f) | GREEN_SUBPIXEL(0x00) | BLUE_SUBPIXEL(0x1f))
+#define LU_BRT_YELLOW (RED_SUBPIXEL(0x1f) | GREEN_SUBPIXEL(0x1f) | BLUE_SUBPIXEL(0x00))
+#define LU_BRT_WHITE (RED_SUBPIXEL(0x1f) | GREEN_SUBPIXEL(0x1f) | BLUE_SUBPIXEL(0x1f))
+/* RED, GREEN, BLUE Entry */
+ { 0x00, 0x00, 0x00, }, /* LU_BLACK */
+ { 0x00, 0x00, 0xA0, }, /* LU_BLUE */
+ { 0x00, 0xA0, 0x00, }, /* LU_GREEN */
+ { 0x00, 0xA0, 0xA0, }, /* LU_CYAN */
+ { 0xA0, 0x00, 0x00, }, /* LU_RED */
+ { 0xA0, 0x00, 0xA0, }, /* LU_VIOLET */
+ { 0xA0, 0xA0, 0x00, }, /* LU_YELLOW */
+ { 0xA0, 0xA0, 0xA0, }, /* LU_WHITE */
+ { 0x50, 0x50, 0x50, }, /* LU_GREY */
+ { 0x50, 0x50, 0xF0, }, /* LU_BRT_BLUE */
+ { 0x50, 0xF0, 0x50, }, /* LU_BRT_GREEN */
+ { 0x50, 0xF0, 0xF0, }, /* LU_BRT_CYAN */
+ { 0xF0, 0x50, 0x50, }, /* LU_BRT_RED */
+ { 0xF0, 0x50, 0xF0, }, /* LU_BRT_VIOLET */
+ { 0xF0, 0xF0, 0x50, }, /* LU_BRT_YELLOW */
+ { 0xF0, 0xF0, 0xF0, }, /* LU_BRT_WHITE */
+#endif
+
+#define BLUE (0x14 << 0)
+#define GREEN (0x14 << 6)
+#define RED (0x14 << 11)
+
+#define HALF_BLUE (0x0a << 0)
+#define HALF_GREEN (0x0a << 6)
+#define HALF_RED (0x0a << 11)
+
+
+#define BRT_BLUE (0x1e << 0)
+#define BRT_GREEN (0x1e << 6)
+#define BRT_RED (0x1e << 11)
+
+#define LU_BLACK 0
+#define LU_BLUE (BLUE)
+#define LU_GREEN (GREEN)
+#define LU_CYAN (GREEN | BLUE)
+#define LU_RED (RED)
+#define LU_VIOLET (RED | BLUE)
+#define LU_YELLOW (RED | GREEN)
+#define LU_WHITE (RED | GREEN | BLUE)
+#define LU_GREY (HALF_RED | HALF_GREEN | HALF_BLUE)
+#define LU_BRT_BLUE (HALF_RED | HALF_GREEN | BRT_BLUE)
+#define LU_BRT_GREEN (HALF_RED | BRT_GREEN | HALF_BLUE)
+#define LU_BRT_CYAN (HALF_RED | BRT_GREEN | BRT_BLUE)
+#define LU_BRT_RED (BRT_RED | HALF_GREEN | HALF_BLUE)
+#define LU_BRT_VIOLET (BRT_RED | HALF_GREEN | BRT_BLUE)
+#define LU_BRT_YELLOW (BRT_RED | BRT_GREEN | HALF_BLUE)
+#define LU_BRT_WHITE (BRT_RED | BRT_GREEN | BRT_BLUE)
+
+const ushort vga_lookup[] = {
+LU_BLACK, /* 0 */
+LU_BLUE, /* 1 */
+LU_GREEN, /* 2 */
+LU_CYAN, /* 3 */
+LU_RED, /* 4 */
+LU_VIOLET, /* 5 */
+LU_YELLOW, /* 6 */
+LU_WHITE, /* 7 */
+LU_GREY, /* 8 */
+LU_BRT_BLUE, /* 9 */
+LU_BRT_GREEN, /* 10 */
+LU_BRT_CYAN, /* 11 */
+LU_BRT_RED, /* 12 */
+LU_BRT_VIOLET, /* 13 */
+LU_BRT_YELLOW, /* 14 */
+LU_BRT_WHITE /* 15 */
+};
+
+/* default foreground and background colors */
+#define SED_BG_DEF 1
+#define SED_FG_DEF 14
+
+/* Draw defines */
+#define TOP 0
+#define BOTTOM (PIXELS_PER_COL-1)
+#define LEFT 0
+#define RIGHT (PIXELS_PER_ROW-1)
+#define CENTER_X (PIXELS_PER_ROW/2)
+#define CENTER_Y (PIXELS_PER_COL/2)
+
+
+/* Vertical and Horizontal Pulse, Start and Non-Display values vary depending
+ * upon the mode. The following section gives some insight into how the
+ * values are arrived at.
+ * ms = milliseconds, us = microseconds, ns = nanoseconds
+ * Mhz = Megaherz, Khz = Kiloherz, Hz = Herz
+ *
+ * ***************************************************************************************************
+ * CRT Mode is 640x480 @ 72Hz VESA compatible timing. PCLK = 31.5Mhz (31.75ns)
+ * ***************************************************************************************************
+ *
+ * CRT MODE HORIZONTAL TIMING PARAMETERS
+ *
+ * |<-------Tha------->|
+ * |___________________| ______
+ * Display Enable _____________________| |____________________|
+ * | |
+ * Horizontal Pulse __ ________|___________________|________ __________
+ * |_________| | | |________|
+ * |<- Thp ->| | | |
+ * | |<-Thbp->| | |
+ * | |<-Thfp->|
+ * |<----------------------Tht-------------------->|
+ *
+ * Tha - Active Display Time = 640 pixels
+ * Thp - Horizontal Pulse = 1.27us/31.75ns = 40 pixels
+ * Thbp - Horizontal Front Porch = 1.016us/31.75ns = 32 pixels
+ * Thfp - Horizontal Back Porch = 3.8us/31.75ns = 120 pixels
+ * Tht - Total Horizontal Time = 832 pixels x 32.75ns/pixel = 26.416us or 38.785Khz
+ *
+ * Correlation between horizontal timing parameters and SED registers
+ */
+#define SED_HOR_PULSE_WIDTH_CRT 0x07 /* Horizontal Pulse Width Register = (Thp/8) - 1 */
+#define SED_HOR_PULSE_START_CRT 0x02 /* Horizontal Pulse Start Position Register = ((Thfp + 2)/8) - 1 */
+#define SED_HOR_NONDISP_CRT 0x17 /* Horizontal Non-Display Period Register = ((Thp + Thfp + Thbp)/8) - 1 */
+/*
+ * CRT MODE VERTICAL TIMING PARAMTERS
+ *
+ * |<-------Tva------->|
+ * |___________________| ______
+ * Display Enable _____________________| |_____________________|
+ * | |
+ * Vertical Pulse __ ________|___________________|________ __________
+ * |_________| | | |________|
+ * |<- Tvp ->| | | |
+ * | |<-Tvbp->| | |
+ * | |<-Tvfp->|
+ * |<----------------------Tvt-------------------->|
+ *
+ * Tva - Active Display Time = 480 lines
+ * Tvp - Vertical Pulse = 3 lines
+ * Tvfp - Vertical Front Porch = 9 lines
+ * Tvbp - Vertical Back Porch = 28 lines
+ * Tvt - Total Horizontal Time = 520 lines x 26.416us/line = 13.73632ms or 72.8Hz
+ *
+ * Correlation between vertical timing parameters and SED registers
+ */
+#define SED_VER_PULSE_WIDTH_CRT 0x02 // VRTC/FPFRAME Pulse Width Register = Tvp - 1
+#define SED_VER_PULSE_START_CRT 0x08 // VRTC/FPFRAME Start Position Register = Tvfp - 1
+#define SED_VER_NONDISP_CRT 0x27 // Vertical Non-Display Period Register = (Tvp + Tvfp + Tvbp) - 1
+/*
+ *****************************************************************************************************
+ * DUAL LCD Mode is 640x480 @ 60Hz VGA compatible timing. PCLK = 25.175Mhz (39.722ns)
+ *****************************************************************************************************
+ *
+ * LCD MODE HORIZONTAL TIMING PARAMTERS
+ *
+ * |<-------Tha------->|
+ * |___________________| ______
+ * Display Enable _____________________| |____________________|
+ * | |
+ * Horizontal Pulse __ ________|___________________|________ __________
+ * |_________| | | |________|
+ * |<- Thp ->| | | |
+ * | |<-Thbp->| | |
+ * | |<-Thfp->|
+ * |<----------------------Tht-------------------->|
+ *
+ * Tha - Active Display Time = 640 pixels
+ * Thp - Horizontal Pulse = 3.8us/39.72ns = 96 pixels
+ * Thfp - Horizontal Front Porch = .595us/39.72ns = 16 pixels
+ * Thbp - Horizontal Backporch = 1.9us/39.72ns = 48 pixels
+ * Tht - Total Horizontal Time = = 800 pixels @ 39.72ns/pixel = 31.776us or 31.47Khz
+ *
+ * Correlation between horizontal timing parameters and SED registers
+ *#define SED_HOR_PULSE_WIDTH_LCD 0x0b // HRTC/FPLINE Pulse Width Register = (Thp/8) - 1
+ *#define SED_HOR_PULSE_START_LCD 0x02 // HRTC/FPLINE Start Position Register = (Thfp/8) - 2
+ *#define SED_HOR_NONDISP_LCD 0x13 // Horizontal Non-Display Period Register = ((Thp + Thfp + Thbp)/8) - 1
+ */
+extern long SED_HOR_PULSE_WIDTH_LCD;
+extern long SED_HOR_PULSE_START_LCD;
+extern long SED_HOR_NONDISP_LCD;
+
+/*
+ *
+ * LCD MODE VERTICAL TIMING PARAMTERS
+ *
+ * |<-------Tva------->|
+ * |___________________| ______
+ * Display Enable _____________________| |_____________________|
+ * | |
+ * Vertical Pulse __ ________|___________________|________ __________
+ * |_________| | | |________|
+ * |<- Tvp ->| | | |
+ * | |<-Tvbp->| | |
+ * | |<-Tvfp->|
+ * |<----------------------Tvt-------------------->|
+ *
+ * Tva - Active Display Time = 480 lines
+ * Tvp - Vertical Pulse = 2 lines
+ * Tvfp - Vertical Front Porch = 10 lines
+ * Tvbp - Vertical Backporch = 33 lines
+ * Tvt - Total Horizontal Time = 525 lines @ 31.776us/line = 16.682ms or 60Hz
+ *
+ * Correlation between vertical timing parameters and SED registers
+ *#define SED_VER_PULSE_WIDTH_LCD 0x01 // VRTC/FPFRAME Pulse Width Register = Tvp - 1
+ *#define SED_VER_PULSE_START_LCD 0x09 // VRTC/FPFRAME Start Position Register = Tvfp - 1
+ *#define SED_VER_NONDISP_LCD 0x2c // Vertical Non-Display Period Register = (Tvp + Tvfp + Tvbp) - 1
+ */
+extern long SED_VER_PULSE_WIDTH_LCD;
+extern long SED_VER_PULSE_START_LCD;
+extern long SED_VER_NONDISP_LCD;
+
+#endif
diff --git a/c/src/lib/libbsp/arm/csb337/console/uarts.c b/c/src/lib/libbsp/arm/csb337/console/uarts.c
index c0bd331ad7..a4713dd5a5 100644
--- a/c/src/lib/libbsp/arm/csb337/console/uarts.c
+++ b/c/src/lib/libbsp/arm/csb337/console/uarts.c
@@ -9,11 +9,13 @@
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
- *
* http://www.rtems.com/license/LICENSE.
*
+ * FrameBuffer Console Device Support added By Joel Sherrill, 2009.
+ *
* $Id$
*/
+
#include <bsp.h>
#include <rtems/libio.h>
#include <termios.h>
@@ -23,17 +25,22 @@
#include <at91rm9200_dbgu.h>
#include <libchip/serial.h>
#include <libchip/sersupp.h>
+#include <bspopts.h>
-/* How many serial ports? */
-#define NUM_DEVS 1
+/* rtems console uses the following minor number */
+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
+#else
+ #define NUM_DEVS 1
+#endif
/* These are used by code in console.c */
unsigned long Console_Port_Count = NUM_DEVS;
console_data Console_Port_Data[NUM_DEVS];
-/* rtems console uses the following minor number */
-rtems_device_minor_number Console_Port_Minor = 0;
-extern console_fns dbgu_fns;
/*
* There's one item in array for each UART.
@@ -45,25 +52,47 @@ extern console_fns dbgu_fns;
* structure to a generic uart.c file with only this in it
*/
console_tbl Console_Port_Tbl[] = {
- {
- "/dev/console", /* sDeviceName */
- SERIAL_CUSTOM, /* deviceType */
- &dbgu_fns, /* pDeviceFns */
- NULL, /* deviceProbe */
- NULL, /* pDeviceFlow */
- 0, /* ulMargin - NOT USED */
- 0, /* ulHysteresis - NOT USED */
- NULL, /* pDeviceParams */
- DBGU_BASE, /* ulCtrlPort1 - Pointer to DBGU 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 */
- }};
+ {
+ "/dev/console", /* sDeviceName */
+ SERIAL_CUSTOM, /* deviceType */
+ &dbgu_fns, /* pDeviceFns */
+ NULL, /* deviceProbe */
+ NULL, /* pDeviceFlow */
+ 0, /* ulMargin - NOT USED */
+ 0, /* ulHysteresis - NOT USED */
+ NULL, /* pDeviceParams */
+ DBGU_BASE, /* ulCtrlPort1 - Pointer to DBGU 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 */
+ },
+#if ENABLE_LCD
+ {
+ "/dev/fbcons", /* sDeviceName */
+ SERIAL_CUSTOM, /* deviceType */
+ &fbcons_fns, /* pDeviceFns */
+ NULL, /* deviceProbe */
+ NULL, /* pDeviceFlow */
+ 0, /* ulMargin - NOT USED */
+ 0, /* ulHysteresis - NOT USED */
+ NULL, /* pDeviceParams */
+ 0, /* ulCtrlPort1 - Pointer to DBGU 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
+};
console_tbl *BSP_get_uart_from_minor(int minor)
diff --git a/c/src/lib/libbsp/arm/csb337/include/bsp.h b/c/src/lib/libbsp/arm/csb337/include/bsp.h
index d06c2807a9..1e5a8cc88f 100644
--- a/c/src/lib/libbsp/arm/csb337/include/bsp.h
+++ b/c/src/lib/libbsp/arm/csb337/include/bsp.h
@@ -37,9 +37,6 @@ extern "C" {
console_tbl *BSP_get_uart_from_minor(int minor);
static inline int32_t BSP_get_baud(void) {return 38400;}
-/* How many serial ports? */
-#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1
-
#define ST_PIMR_PIV 33 /* 33 ticks of the 32.768Khz clock ~= 1msec */
/*
diff --git a/c/src/lib/libbsp/arm/csb337/include/sed1356.h b/c/src/lib/libbsp/arm/csb337/include/sed1356.h
new file mode 100644
index 0000000000..acf207c2b1
--- /dev/null
+++ b/c/src/lib/libbsp/arm/csb337/include/sed1356.h
@@ -0,0 +1,35 @@
+/*
+ * Public Interface for SED Video Controller Operations
+ *
+ * COPYRIGHT (c) 1989-2009.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#ifndef __SED1356_h
+#define __SED1356_h
+
+void sed_init(void);
+
+int sed_frame_buffer_size(void);
+
+void sed_clr_row(int char_row);
+
+void sed_putchar(char c);
+
+void sed_putstring(char *s);
+
+void sed_clearscreen(void);
+
+void sed_write_frame_buffer(
+ uint32_t i,
+ uint16_t wr16
+);
+
+#endif
+/* end of file */
diff --git a/c/src/lib/libbsp/arm/csb337/preinstall.am b/c/src/lib/libbsp/arm/csb337/preinstall.am
index 6eae3f3759..ec6b0f7ec6 100644
--- a/c/src/lib/libbsp/arm/csb337/preinstall.am
+++ b/c/src/lib/libbsp/arm/csb337/preinstall.am
@@ -45,6 +45,10 @@ $(PROJECT_INCLUDE)/tm27.h: ../../shared/include/tm27.h $(PROJECT_INCLUDE)/$(dirs
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
+$(PROJECT_INCLUDE)/sed1356.h: include/sed1356.h $(PROJECT_INCLUDE)/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/sed1356.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/sed1356.h
+
$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
@@ -57,6 +61,15 @@ $(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
+if ENABLE_LCD
+$(PROJECT_INCLUDE)/sed1356_16bit.h: console/sed1356_16bit.h $(PROJECT_INCLUDE)/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/sed1356_16bit.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/sed1356_16bit.h
+
+$(PROJECT_INCLUDE)/font8x16.h: console/font8x16.h $(PROJECT_INCLUDE)/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/font8x16.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/font8x16.h
+endif
$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
diff --git a/c/src/lib/libbsp/arm/csb337/startup/memmap.c b/c/src/lib/libbsp/arm/csb337/startup/memmap.c
index 8767f5d8bf..4e219bee73 100644
--- a/c/src/lib/libbsp/arm/csb337/startup/memmap.c
+++ b/c/src/lib/libbsp/arm/csb337/startup/memmap.c
@@ -24,7 +24,9 @@ mmu_sect_map_t mem_map[] = {
#else /* CSB337 */
{0x20000000, 0x20000000, 32, MMU_CACHE_WTHROUGH}, /* SDRAM */
#endif
+#if ENABLE_LCD
{0x30000000, 0x30000000, 8, MMU_CACHE_NONE}, /* video */
+#endif
{0x40000000, 0x40000000, 1, MMU_CACHE_NONE}, /* Expansion CS0 */
{0x50000000, 0x50000000, 1, MMU_CACHE_NONE}, /* CF CE 1 */
{0x60000000, 0x60000000, 1, MMU_CACHE_NONE}, /* CF CE 1 */