summaryrefslogtreecommitdiffstats
path: root/Src/osmolib/src/target/firmware/display
diff options
context:
space:
mode:
Diffstat (limited to 'Src/osmolib/src/target/firmware/display')
-rw-r--r--Src/osmolib/src/target/firmware/display/display.c20
-rw-r--r--Src/osmolib/src/target/firmware/display/font_r8x8.c261
-rw-r--r--Src/osmolib/src/target/firmware/display/font_r8x8_horiz.c261
-rw-r--r--Src/osmolib/src/target/firmware/display/ssd1783.c257
-rw-r--r--Src/osmolib/src/target/firmware/display/ssd1963.c210
-rw-r--r--Src/osmolib/src/target/firmware/display/st7558.c121
-rw-r--r--Src/osmolib/src/target/firmware/display/td014.c185
7 files changed, 1315 insertions, 0 deletions
diff --git a/Src/osmolib/src/target/firmware/display/display.c b/Src/osmolib/src/target/firmware/display/display.c
new file mode 100644
index 0000000..1c8f1fb
--- /dev/null
+++ b/Src/osmolib/src/target/firmware/display/display.c
@@ -0,0 +1,20 @@
+
+#include <stdint.h>
+
+#include <display.h>
+
+struct display_driver *display;
+
+int display_puts(const char *str)
+{
+ char c;
+
+ if (display->puts)
+ display->puts(str);
+ else {
+ while ((c = *str++))
+ display_putchar(c);
+ }
+
+ return 0;
+}
diff --git a/Src/osmolib/src/target/firmware/display/font_r8x8.c b/Src/osmolib/src/target/firmware/display/font_r8x8.c
new file mode 100644
index 0000000..6f8315d
--- /dev/null
+++ b/Src/osmolib/src/target/firmware/display/font_r8x8.c
@@ -0,0 +1,261 @@
+/* 8x8 font, vertical scanning */
+
+const unsigned char fontdata_r8x8[] ={
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x7e, 0x81, 0x95, 0xb1, 0xb1, 0x95, 0x81, 0x7e,
+ 0x7e, 0xff, 0xeb, 0xcf, 0xcf, 0xeb, 0xff, 0x7e,
+ 0x0e, 0x1f, 0x3f, 0x7e, 0x3f, 0x1f, 0x0e, 0x00,
+ 0x00, 0x08, 0x1c, 0x3e, 0x7f, 0x3e, 0x1c, 0x08,
+ 0x00, 0x38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e, 0x2a, 0x08, 0x08, 0x08, 0x00,
+ 0x3c, 0x3c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x08, 0x1c, 0x3e, 0x08, 0x08, 0x3e, 0x1c, 0x08,
+ 0x30, 0x38, 0x3c, 0x3e, 0x3e, 0x3c, 0x38, 0x30,
+ 0x06, 0x0e, 0x1e, 0x3e, 0x3e, 0x1e, 0x0e, 0x06,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x06, 0x5f, 0x5f, 0x06, 0x00, 0x00, 0x00,
+ 0x00, 0x07, 0x07, 0x00, 0x07, 0x07, 0x00, 0x00,
+ 0x14, 0x7f, 0x7f, 0x14, 0x7f, 0x7f, 0x14, 0x00,
+ 0x00, 0x24, 0x2e, 0x6b, 0x6b, 0x3a, 0x12, 0x00,
+ 0x00, 0x46, 0x66, 0x30, 0x18, 0x0c, 0x66, 0x62,
+ 0x00, 0x30, 0x7a, 0x4f, 0x5d, 0x37, 0x7a, 0x48,
+ 0x00, 0x04, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x1c, 0x3e, 0x63, 0x41, 0x00, 0x00,
+ 0x00, 0x00, 0x41, 0x63, 0x3e, 0x1c, 0x00, 0x00,
+ 0x08, 0x2a, 0x3e, 0x1c, 0x1c, 0x3e, 0x2a, 0x08,
+ 0x08, 0x08, 0x3e, 0x3e, 0x08, 0x08, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0xe0, 0x60, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x03, 0x01,
+ 0x00, 0x3e, 0x7f, 0x71, 0x59, 0x4d, 0x7f, 0x3e,
+ 0x00, 0x44, 0x42, 0x7f, 0x7f, 0x40, 0x40, 0x00,
+ 0x00, 0x62, 0x73, 0x59, 0x49, 0x6f, 0x66, 0x00,
+ 0x00, 0x22, 0x63, 0x49, 0x49, 0x7f, 0x36, 0x00,
+ 0x00, 0x18, 0x1c, 0x16, 0x53, 0x7f, 0x7f, 0x50,
+ 0x00, 0x27, 0x67, 0x45, 0x45, 0x7d, 0x39, 0x00,
+ 0x00, 0x3c, 0x7e, 0x4b, 0x49, 0x79, 0x30, 0x00,
+ 0x00, 0x03, 0x03, 0x71, 0x79, 0x0f, 0x07, 0x00,
+ 0x00, 0x36, 0x7f, 0x49, 0x49, 0x7f, 0x36, 0x00,
+ 0x00, 0x06, 0x4f, 0x49, 0x69, 0x3f, 0x1e, 0x00,
+ 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0xe6, 0x66, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x1c, 0x36, 0x63, 0x41, 0x00, 0x00,
+ 0x00, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x00,
+ 0x00, 0x00, 0x41, 0x63, 0x36, 0x1c, 0x08, 0x00,
+ 0x00, 0x02, 0x03, 0x51, 0x59, 0x0f, 0x06, 0x00,
+ 0x00, 0x3e, 0x7f, 0x41, 0x5d, 0x55, 0x57, 0x1e,
+ 0x00, 0x7c, 0x7e, 0x13, 0x13, 0x7e, 0x7c, 0x00,
+ 0x00, 0x41, 0x7f, 0x7f, 0x49, 0x49, 0x7f, 0x36,
+ 0x00, 0x1c, 0x3e, 0x63, 0x41, 0x41, 0x63, 0x22,
+ 0x00, 0x41, 0x7f, 0x7f, 0x41, 0x63, 0x3e, 0x1c,
+ 0x00, 0x41, 0x7f, 0x7f, 0x49, 0x5d, 0x41, 0x63,
+ 0x00, 0x41, 0x7f, 0x7f, 0x49, 0x1d, 0x01, 0x03,
+ 0x00, 0x1c, 0x3e, 0x63, 0x41, 0x51, 0x73, 0x72,
+ 0x00, 0x7f, 0x7f, 0x08, 0x08, 0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+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
+ 0x00, 0x00, 0x00, 0x03, 0x07, 0x04, 0x00, 0x00,
+ 0x00, 0x20, 0x74, 0x54, 0x54, 0x3c, 0x78, 0x40,
+ 0x00, 0x41, 0x7f, 0x3f, 0x48, 0x48, 0x78, 0x30,
+ 0x00, 0x38, 0x7c, 0x44, 0x44, 0x6c, 0x28, 0x00,
+ 0x00, 0x30, 0x78, 0x48, 0x49, 0x3f, 0x7f, 0x40,
+ 0x00, 0x38, 0x7c, 0x54, 0x54, 0x5c, 0x18, 0x00,
+ 0x00, 0x48, 0x7e, 0x7f, 0x49, 0x03, 0x02, 0x00,
+ 0x00, 0x98, 0xbc, 0xa4, 0xa4, 0xf8, 0x7c, 0x04,
+ 0x00, 0x41, 0x7f, 0x7f, 0x08, 0x04, 0x7c, 0x78,
+ 0x00, 0x00, 0x44, 0x7d, 0x7d, 0x40, 0x00, 0x00,
+ 0x00, 0x60, 0xe0, 0x80, 0x80, 0xfd, 0x7d, 0x00,
+ 0x00, 0x41, 0x7f, 0x7f, 0x10, 0x38, 0x6c, 0x44,
+ 0x00, 0x00, 0x41, 0x7f, 0x7f, 0x40, 0x00, 0x00,
+ 0x00, 0x7c, 0x7c, 0x18, 0x38, 0x1c, 0x7c, 0x78,
+ 0x00, 0x7c, 0x7c, 0x04, 0x04, 0x7c, 0x78, 0x00,
+ 0x00, 0x38, 0x7c, 0x44, 0x44, 0x7c, 0x38, 0x00,
+ 0x00, 0x84, 0xfc, 0xf8, 0xa4, 0x24, 0x3c, 0x18,
+ 0x00, 0x18, 0x3c, 0x24, 0xa4, 0xf8, 0xfc, 0x84,
+ 0x00, 0x44, 0x7c, 0x78, 0x4c, 0x04, 0x1c, 0x18,
+ 0x00, 0x48, 0x5c, 0x54, 0x54, 0x74, 0x24, 0x00,
+ 0x00, 0x00, 0x04, 0x3e, 0x7f, 0x44, 0x24, 0x00,
+ 0x00, 0x3c, 0x7c, 0x40, 0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, 0x4a, 0x7a, 0x32, 0x00,
+ 0x00, 0x38, 0x78, 0x40, 0x42, 0x7a, 0x7a, 0x40,
+ 0x00, 0x7a, 0x7a, 0x0a, 0x0a, 0x7a, 0x70, 0x00,
+ 0x00, 0x7d, 0x7d, 0x19, 0x31, 0x7d, 0x7d, 0x00,
+ 0x00, 0x00, 0x26, 0x2f, 0x29, 0x2f, 0x2f, 0x28,
+ 0x00, 0x00, 0x26, 0x2f, 0x29, 0x2f, 0x26, 0x00,
+ 0x00, 0x30, 0x78, 0x4d, 0x45, 0x60, 0x20, 0x00,
+ 0x00, 0x38, 0x38, 0x08, 0x08, 0x08, 0x08, 0x00,
+ 0x08, 0x08, 0x08, 0x08, 0x38, 0x38, 0x00, 0x00,
+ 0x4f, 0x6f, 0x30, 0x18, 0xcc, 0xee, 0xbb, 0x91,
+ 0x4f, 0x6f, 0x30, 0x18, 0x6c, 0x76, 0xfb, 0xf9,
+ 0x00, 0x00, 0x00, 0x7b, 0x7b, 0x00, 0x00, 0x00,
+ 0x08, 0x1c, 0x36, 0x22, 0x08, 0x1c, 0x36, 0x22,
+ 0x22, 0x36, 0x1c, 0x08, 0x22, 0x36, 0x1c, 0x08,
+ 0xaa, 0x00, 0x55, 0x00, 0xaa, 0x00, 0x55, 0x00,
+ 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55,
+ 0xdd, 0xff, 0xaa, 0x77, 0xdd, 0xaa, 0xff, 0x77,
+ 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
+ 0x10, 0x10, 0x10, 0xff, 0xff, 0x00, 0x00, 0x00,
+ 0x14, 0x14, 0x14, 0xff, 0xff, 0x00, 0x00, 0x00,
+ 0x10, 0x10, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00,
+ 0x10, 0x10, 0xf0, 0xf0, 0x10, 0xf0, 0xf0, 0x00,
+ 0x14, 0x14, 0x14, 0xfc, 0xfc, 0x00, 0x00, 0x00,
+ 0x14, 0x14, 0xf7, 0xf7, 0x00, 0xff, 0xff, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00,
+ 0x14, 0x14, 0xf4, 0xf4, 0x04, 0xfc, 0xfc, 0x00,
+ 0x14, 0x14, 0x17, 0x17, 0x10, 0x1f, 0x1f, 0x00,
+ 0x10, 0x10, 0x1f, 0x1f, 0x10, 0x1f, 0x1f, 0x00,
+ 0x14, 0x14, 0x14, 0x1f, 0x1f, 0x00, 0x00, 0x00,
+ 0x10, 0x10, 0x10, 0xf0, 0xf0, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x10, 0x10, 0x10,
+ 0x10, 0x10, 0x10, 0x1f, 0x1f, 0x10, 0x10, 0x10,
+ 0x10, 0x10, 0x10, 0xf0, 0xf0, 0x10, 0x10, 0x10,
+ 0x00, 0x00, 0x00, 0xff, 0xff, 0x10, 0x10, 0x10,
+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
+ 0x10, 0x10, 0x10, 0xff, 0xff, 0x10, 0x10, 0x10,
+ 0x00, 0x00, 0x00, 0xff, 0xff, 0x14, 0x14, 0x14,
+ 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x10,
+ 0x00, 0x00, 0x1f, 0x1f, 0x10, 0x17, 0x17, 0x14,
+ 0x00, 0x00, 0xfc, 0xfc, 0x04, 0xf4, 0xf4, 0x14,
+ 0x14, 0x14, 0x17, 0x17, 0x10, 0x17, 0x17, 0x14,
+ 0x14, 0x14, 0xf4, 0xf4, 0x04, 0xf4, 0xf4, 0x14,
+ 0x00, 0x00, 0xff, 0xff, 0x00, 0xf7, 0xf7, 0x14,
+ 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
+ 0x14, 0x14, 0xf7, 0xf7, 0x00, 0xf7, 0xf7, 0x14,
+ 0x14, 0x14, 0x14, 0x17, 0x17, 0x14, 0x14, 0x14,
+ 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 0x00,
+ 0x00, 0x19, 0x1d, 0x17, 0x12, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x3c, 0x3c, 0x3c, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+
diff --git a/Src/osmolib/src/target/firmware/display/font_r8x8_horiz.c b/Src/osmolib/src/target/firmware/display/font_r8x8_horiz.c
new file mode 100644
index 0000000..046d09b
--- /dev/null
+++ b/Src/osmolib/src/target/firmware/display/font_r8x8_horiz.c
@@ -0,0 +1,261 @@
+/* 8x8 font, right aligned, horizontal scanning */
+
+const unsigned char fontdata_r8x8_horiz[] ={
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x7e,0x81,0xa5,0x81,0xbd,0x99,0x81,0x7e,
+ 0x7e,0xff,0xdb,0xff,0xc3,0xe7,0xff,0x7e,
+ 0x6c,0xfe,0xfe,0xfe,0x7c,0x38,0x10,0x00,
+ 0x08,0x1c,0x3e,0x7f,0x3e,0x1c,0x08,0x00,
+ 0x1c,0x1c,0x1c,0x7f,0x7f,0x6b,0x08,0x1c,
+ 0x10,0x10,0x38,0x7c,0xfe,0x7c,0x10,0x38,
+ 0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00,
+ 0xff,0xff,0xe7,0xc3,0xc3,0xe7,0xff,0xff,
+ 0x00,0x3c,0x66,0x42,0x42,0x66,0x3c,0x00,
+ 0xff,0xc3,0x99,0xbd,0xbd,0x99,0xc3,0xff,
+ 0x0f,0x07,0x0f,0x7d,0xcc,0xcc,0xcc,0x78,
+ 0x3c,0x66,0x66,0x66,0x3c,0x18,0x7e,0x18,
+ 0x3f,0x33,0x3f,0x30,0x30,0x70,0xf0,0xe0,
+ 0x7f,0x63,0x7f,0x63,0x63,0x67,0xe6,0xc0,
+ 0x18,0xdb,0x3c,0xe7,0xe7,0x3c,0xdb,0x18,
+ 0x80,0xe0,0xf8,0xfe,0xf8,0xe0,0x80,0x00,
+ 0x02,0x0e,0x3e,0xfe,0x3e,0x0e,0x02,0x00,
+ 0x18,0x3c,0x7e,0x18,0x18,0x7e,0x3c,0x18,
+ 0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x00,
+ 0x7f,0xdb,0xdb,0x7b,0x1b,0x1b,0x1b,0x00,
+ 0x3e,0x63,0x38,0x6c,0x6c,0x38,0xcc,0x78,
+ 0x00,0x00,0x00,0x00,0x7e,0x7e,0x7e,0x00,
+ 0x18,0x3c,0x7e,0x18,0x7e,0x3c,0x18,0xff,
+ 0x18,0x3c,0x7e,0x18,0x18,0x18,0x18,0x00,
+ 0x18,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00,
+ 0x00,0x18,0x0c,0xfe,0x0c,0x18,0x00,0x00,
+ 0x00,0x30,0x60,0xfe,0x60,0x30,0x00,0x00,
+ 0x00,0x00,0xc0,0xc0,0xc0,0xfe,0x00,0x00,
+ 0x00,0x24,0x66,0xff,0x66,0x24,0x00,0x00,
+ 0x00,0x18,0x3c,0x7e,0xff,0xff,0x00,0x00,
+ 0x00,0xff,0xff,0x7e,0x3c,0x18,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x30,0x78,0x78,0x30,0x30,0x00,0x30,0x00,
+ 0x6c,0x6c,0x6c,0x00,0x00,0x00,0x00,0x00,
+ 0x6c,0x6c,0xfe,0x6c,0xfe,0x6c,0x6c,0x00,
+ 0x18,0x3e,0x60,0x3c,0x06,0x7c,0x18,0x00,
+ 0x00,0x63,0x66,0x0c,0x18,0x33,0x63,0x00,
+ 0x1c,0x36,0x1c,0x3b,0x6e,0x66,0x3b,0x00,
+ 0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,
+ 0x0c,0x18,0x30,0x30,0x30,0x18,0x0c,0x00,
+ 0x30,0x18,0x0c,0x0c,0x0c,0x18,0x30,0x00,
+ 0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00,
+ 0x00,0x30,0x30,0xfc,0x30,0x30,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x30,
+ 0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,
+ 0x03,0x06,0x0c,0x18,0x30,0x60,0x40,0x00,
+ 0x3e,0x63,0x67,0x6f,0x7b,0x73,0x3e,0x00,
+ 0x18,0x38,0x58,0x18,0x18,0x18,0x7e,0x00,
+ 0x3c,0x66,0x06,0x1c,0x30,0x66,0x7e,0x00,
+ 0x3c,0x66,0x06,0x1c,0x06,0x66,0x3c,0x00,
+ 0x0e,0x1e,0x36,0x66,0x7f,0x06,0x0f,0x00,
+ 0x7e,0x60,0x7c,0x06,0x06,0x66,0x3c,0x00,
+ 0x1c,0x30,0x60,0x7c,0x66,0x66,0x3c,0x00,
+ 0x7e,0x66,0x06,0x0c,0x18,0x18,0x18,0x00,
+ 0x3c,0x66,0x66,0x3c,0x66,0x66,0x3c,0x00,
+ 0x3c,0x66,0x66,0x3e,0x06,0x0c,0x38,0x00,
+ 0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x00,
+ 0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x30,
+ 0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x00,
+ 0x00,0x00,0x7e,0x00,0x00,0x7e,0x00,0x00,
+ 0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x00,
+ 0x3c,0x66,0x06,0x0c,0x18,0x00,0x18,0x00,
+ 0x3e,0x63,0x6f,0x69,0x6f,0x60,0x3e,0x00,
+ 0x18,0x3c,0x66,0x66,0x7e,0x66,0x66,0x00,
+ 0x7e,0x33,0x33,0x3e,0x33,0x33,0x7e,0x00,
+ 0x1e,0x33,0x60,0x60,0x60,0x33,0x1e,0x00,
+ 0x7c,0x36,0x33,0x33,0x33,0x36,0x7c,0x00,
+ 0x7f,0x31,0x34,0x3c,0x34,0x31,0x7f,0x00,
+ 0x7f,0x31,0x34,0x3c,0x34,0x30,0x78,0x00,
+ 0x1e,0x33,0x60,0x60,0x67,0x33,0x1f,0x00,
+ 0x66,0x66,0x66,0x7e,0x66,0x66,0x66,0x00,
+ 0x3c,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,
+ 0x0f,0x06,0x06,0x06,0x66,0x66,0x3c,0x00,
+ 0x73,0x33,0x36,0x3c,0x36,0x33,0x73,0x00,
+ 0x78,0x30,0x30,0x30,0x31,0x33,0x7f,0x00,
+ 0x63,0x77,0x7f,0x7f,0x6b,0x63,0x63,0x00,
+ 0x63,0x73,0x7b,0x6f,0x67,0x63,0x63,0x00,
+ 0x3e,0x63,0x63,0x63,0x63,0x63,0x3e,0x00,
+ 0x7e,0x33,0x33,0x3e,0x30,0x30,0x78,0x00,
+ 0x3c,0x66,0x66,0x66,0x6e,0x3c,0x0e,0x00,
+ 0x7e,0x33,0x33,0x3e,0x36,0x33,0x73,0x00,
+ 0x3c,0x66,0x30,0x18,0x0c,0x66,0x3c,0x00,
+ 0x7e,0x5a,0x18,0x18,0x18,0x18,0x3c,0x00,
+ 0x66,0x66,0x66,0x66,0x66,0x66,0x7e,0x00,
+ 0x66,0x66,0x66,0x66,0x66,0x3c,0x18,0x00,
+ 0x63,0x63,0x63,0x6b,0x7f,0x77,0x63,0x00,
+ 0x63,0x63,0x36,0x1c,0x1c,0x36,0x63,0x00,
+ 0x66,0x66,0x66,0x3c,0x18,0x18,0x3c,0x00,
+ 0x7f,0x63,0x46,0x0c,0x19,0x33,0x7f,0x00,
+ 0x3c,0x30,0x30,0x30,0x30,0x30,0x3c,0x00,
+ 0x60,0x30,0x18,0x0c,0x06,0x03,0x01,0x00,
+ 0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,
+ 0x08,0x1c,0x36,0x63,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,
+ 0x18,0x18,0x0c,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x3c,0x06,0x3e,0x66,0x3b,0x00,
+ 0x70,0x30,0x30,0x3e,0x33,0x33,0x6e,0x00,
+ 0x00,0x00,0x3c,0x66,0x60,0x66,0x3c,0x00,
+ 0x0e,0x06,0x06,0x3e,0x66,0x66,0x3b,0x00,
+ 0x00,0x00,0x3c,0x66,0x7e,0x60,0x3c,0x00,
+ 0x1c,0x36,0x30,0x78,0x30,0x30,0x78,0x00,
+ 0x00,0x00,0x3b,0x66,0x66,0x3e,0x06,0x7c,
+ 0x70,0x30,0x36,0x3b,0x33,0x33,0x73,0x00,
+ 0x18,0x00,0x38,0x18,0x18,0x18,0x3c,0x00,
+ 0x06,0x00,0x06,0x06,0x06,0x66,0x66,0x3c,
+ 0x70,0x30,0x33,0x36,0x3c,0x36,0x73,0x00,
+ 0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,
+ 0x00,0x00,0x66,0x7f,0x7f,0x6b,0x63,0x00,
+ 0x00,0x00,0x7c,0x66,0x66,0x66,0x66,0x00,
+ 0x00,0x00,0x3c,0x66,0x66,0x66,0x3c,0x00,
+ 0x00,0x00,0x6e,0x33,0x33,0x3e,0x30,0x78,
+ 0x00,0x00,0x3b,0x66,0x66,0x3e,0x06,0x0f,
+ 0x00,0x00,0x6e,0x3b,0x33,0x30,0x78,0x00,
+ 0x00,0x00,0x3e,0x60,0x3c,0x06,0x7c,0x00,
+ 0x08,0x18,0x3e,0x18,0x18,0x1a,0x0c,0x00,
+ 0x00,0x00,0x66,0x66,0x66,0x66,0x3b,0x00,
+ 0x00,0x00,0x66,0x66,0x66,0x3c,0x18,0x00,
+ 0x00,0x00,0x63,0x6b,0x7f,0x7f,0x36,0x00,
+ 0x00,0x00,0x63,0x36,0x1c,0x36,0x63,0x00,
+ 0x00,0x00,0x66,0x66,0x66,0x3e,0x06,0x7c,
+ 0x00,0x00,0x7e,0x4c,0x18,0x32,0x7e,0x00,
+ 0x0e,0x18,0x18,0x70,0x18,0x18,0x0e,0x00,
+ 0x0c,0x0c,0x0c,0x00,0x0c,0x0c,0x0c,0x00,
+ 0x70,0x18,0x18,0x0e,0x18,0x18,0x70,0x00,
+ 0x3b,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x08,0x1c,0x36,0x63,0x63,0x7f,0x00,
+ 0x3c,0x66,0x60,0x66,0x3c,0x0c,0x06,0x3c,
+ 0x00,0x66,0x00,0x66,0x66,0x66,0x3f,0x00,
+ 0x1c,0x00,0x78,0xcc,0xfc,0xc0,0x78,0x00,
+ 0x7e,0xc3,0x3c,0x06,0x3e,0x66,0x3f,0x00,
+ 0x66,0x00,0x3c,0x06,0x3e,0x66,0x3f,0x00,
+ 0x70,0x00,0x3c,0x06,0x3e,0x66,0x3f,0x00,
+ 0x18,0x18,0x3c,0x06,0x3e,0x66,0x3f,0x00,
+ 0x00,0x00,0x3c,0x60,0x60,0x3c,0x06,0x1c,
+ 0x7e,0xc3,0x3c,0x66,0x7e,0x60,0x3c,0x00,
+ 0xcc,0x00,0x78,0xcc,0xfc,0xc0,0x78,0x00,
+ 0x70,0x00,0x3c,0x66,0x7e,0x60,0x3c,0x00,
+ 0x66,0x00,0x38,0x18,0x18,0x18,0x3c,0x00,
+ 0x3e,0x63,0x1c,0x0c,0x0c,0x0c,0x1e,0x00,
+ 0x70,0x00,0x38,0x18,0x18,0x18,0x3c,0x00,
+ 0x63,0x1c,0x36,0x63,0x7f,0x63,0x63,0x00,
+ 0x18,0x18,0x00,0x3c,0x66,0x7e,0x66,0x00,
+ 0x1c,0x00,0xfc,0x60,0x78,0x60,0xfc,0x00,
+ 0x00,0x00,0x7f,0x0c,0x7f,0xcc,0x7f,0x00,
+ 0x1f,0x36,0x66,0x7f,0x66,0x66,0x67,0x00,
+ 0x3c,0x66,0x00,0x3c,0x66,0x66,0x3c,0x00,
+ 0x00,0x66,0x00,0x3c,0x66,0x66,0x3c,0x00,
+ 0x00,0x70,0x00,0x3c,0x66,0x66,0x3c,0x00,
+ 0x3c,0x66,0x00,0x66,0x66,0x66,0x3f,0x00,
+ 0x00,0x70,0x00,0x66,0x66,0x66,0x3f,0x00,
+ 0x00,0xcc,0x00,0xcc,0xcc,0x7c,0x0c,0xf8,
+ 0xc3,0x18,0x3c,0x66,0x66,0x3c,0x18,0x00,
+ 0x66,0x00,0x66,0x66,0x66,0x66,0x3c,0x00,
+ 0x0c,0x0c,0x3f,0x60,0x60,0x3f,0x0c,0x0c,
+ 0x1c,0x36,0x32,0x78,0x30,0x73,0x7e,0x00,
+ 0x66,0x66,0x3c,0x7e,0x18,0x7e,0x18,0x18,
+ 0xf8,0xcc,0xcc,0xfa,0xc6,0xcf,0xc6,0xc7,
+ 0x0e,0x1b,0x18,0x3c,0x18,0x18,0xd8,0x70,
+ 0x0e,0x00,0x3c,0x06,0x3e,0x66,0x3f,0x00,
+ 0x1c,0x00,0x38,0x18,0x18,0x18,0x3c,0x00,
+ 0x00,0x0e,0x00,0x3c,0x66,0x66,0x3c,0x00,
+ 0x00,0x0e,0x00,0x66,0x66,0x66,0x3f,0x00,
+ 0x00,0x7c,0x00,0x7c,0x66,0x66,0x66,0x00,
+ 0x7e,0x00,0x66,0x76,0x7e,0x6e,0x66,0x00,
+ 0x1e,0x36,0x36,0x1f,0x00,0x3f,0x00,0x00,
+ 0x1c,0x36,0x36,0x1c,0x00,0x3e,0x00,0x00,
+ 0x18,0x00,0x18,0x30,0x60,0x66,0x3c,0x00,
+ 0x00,0x00,0x00,0x7e,0x60,0x60,0x00,0x00,
+ 0x00,0x00,0x00,0xfc,0x0c,0x0c,0x00,0x00,
+ 0xc3,0xc6,0xcc,0xde,0x33,0x66,0xcc,0x0f,
+ 0xc3,0xc6,0xcc,0xdb,0x37,0x6f,0xcf,0x03,
+ 0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00,
+ 0x00,0x33,0x66,0xcc,0x66,0x33,0x00,0x00,
+ 0x00,0xcc,0x66,0x33,0x66,0xcc,0x00,0x00,
+ 0x22,0x88,0x22,0x88,0x22,0x88,0x22,0x88,
+ 0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,
+ 0xdb,0x77,0xdb,0xee,0xdb,0x77,0xdb,0xee,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0xf8,0x18,0x18,0x18,
+ 0x18,0x18,0xf8,0x18,0xf8,0x18,0x18,0x18,
+ 0x36,0x36,0x36,0x36,0xf6,0x36,0x36,0x36,
+ 0x00,0x00,0x00,0x00,0xfe,0x36,0x36,0x36,
+ 0x00,0x00,0xf8,0x18,0xf8,0x18,0x18,0x18,
+ 0x36,0x36,0xf6,0x06,0xf6,0x36,0x36,0x36,
+ 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+ 0x00,0x00,0xfe,0x06,0xf6,0x36,0x36,0x36,
+ 0x36,0x36,0xf6,0x06,0xfe,0x00,0x00,0x00,
+ 0x36,0x36,0x36,0x36,0xfe,0x00,0x00,0x00,
+ 0x18,0x18,0xf8,0x18,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xf8,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x1f,0x00,0x00,0x00,
+ 0x18,0x18,0x18,0x18,0xff,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xff,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x1f,0x18,0x18,0x18,
+ 0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
+ 0x18,0x18,0x18,0x18,0xff,0x18,0x18,0x18,
+ 0x18,0x18,0x1f,0x18,0x1f,0x18,0x18,0x18,
+ 0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36,
+ 0x36,0x36,0x37,0x30,0x3f,0x00,0x00,0x00,
+ 0x00,0x00,0x3f,0x30,0x37,0x36,0x36,0x36,
+ 0x36,0x36,0xf7,0x00,0xff,0x00,0x00,0x00,
+ 0x00,0x00,0xff,0x00,0xf7,0x36,0x36,0x36,
+ 0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36,
+ 0x00,0x00,0xff,0x00,0xff,0x00,0x00,0x00,
+ 0x36,0x36,0xf7,0x00,0xf7,0x36,0x36,0x36,
+ 0x18,0x18,0xff,0x00,0xff,0x00,0x00,0x00,
+ 0x36,0x36,0x36,0x36,0xff,0x00,0x00,0x00,
+ 0x00,0x00,0xff,0x00,0xff,0x18,0x18,0x18,
+ 0x00,0x00,0x00,0x00,0xff,0x36,0x36,0x36,
+ 0x36,0x36,0x36,0x36,0x3f,0x00,0x00,0x00,
+ 0x18,0x18,0x1f,0x18,0x1f,0x00,0x00,0x00,
+ 0x00,0x00,0x1f,0x18,0x1f,0x18,0x18,0x18,
+ 0x00,0x00,0x00,0x00,0x3f,0x36,0x36,0x36,
+ 0x36,0x36,0x36,0x36,0xff,0x36,0x36,0x36,
+ 0x18,0x18,0xff,0x18,0xff,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x1f,0x18,0x18,0x18,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
+ 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,
+ 0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+ 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x3b,0x6e,0x64,0x6e,0x3b,0x00,
+ 0x00,0x3c,0x66,0x7c,0x66,0x7c,0x60,0x60,
+ 0x00,0x7e,0x66,0x60,0x60,0x60,0x60,0x00,
+ 0x00,0x7f,0x36,0x36,0x36,0x36,0x36,0x00,
+ 0x7e,0x66,0x30,0x18,0x30,0x66,0x7e,0x00,
+ 0x00,0x00,0x3f,0x6c,0x6c,0x6c,0x38,0x00,
+ 0x00,0x33,0x33,0x33,0x33,0x3e,0x30,0x60,
+ 0x00,0x3b,0x6e,0x0c,0x0c,0x0c,0x0c,0x00,
+ 0x7e,0x18,0x3c,0x66,0x66,0x3c,0x18,0x7e,
+ 0x1c,0x36,0x63,0x7f,0x63,0x36,0x1c,0x00,
+ 0x1c,0x36,0x63,0x63,0x36,0x36,0x77,0x00,
+ 0x0e,0x18,0x0c,0x3e,0x66,0x66,0x3c,0x00,
+ 0x00,0x00,0x7e,0xdb,0xdb,0x7e,0x00,0x00,
+ 0x06,0x0c,0x7e,0xdb,0xdb,0x7e,0x60,0xc0,
+ 0x1c,0x30,0x60,0x7c,0x60,0x30,0x1c,0x00,
+ 0x3c,0x66,0x66,0x66,0x66,0x66,0x66,0x00,
+ 0x00,0x7e,0x00,0x7e,0x00,0x7e,0x00,0x00,
+ 0x18,0x18,0x7e,0x18,0x18,0x00,0x7e,0x00,
+ 0x30,0x18,0x0c,0x18,0x30,0x00,0x7e,0x00,
+ 0x0c,0x18,0x30,0x18,0x0c,0x00,0x7e,0x00,
+ 0x0e,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0xd8,0xd8,0x70,
+ 0x18,0x18,0x00,0x7e,0x00,0x18,0x18,0x00,
+ 0x00,0x3b,0x6e,0x00,0x3b,0x6e,0x00,0x00,
+ 0x1c,0x36,0x36,0x1c,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x0c,0x0c,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
+ 0x0f,0x0c,0x0c,0x0c,0xec,0x6c,0x3c,0x1c,
+ 0x78,0x6c,0x6c,0x6c,0x6c,0x00,0x00,0x00,
+ 0x70,0x18,0x30,0x60,0x78,0x00,0x00,0x00,
+ 0x00,0x00,0x3c,0x3c,0x3c,0x3c,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+};
+
diff --git a/Src/osmolib/src/target/firmware/display/ssd1783.c b/Src/osmolib/src/target/firmware/display/ssd1783.c
new file mode 100644
index 0000000..5696b48
--- /dev/null
+++ b/Src/osmolib/src/target/firmware/display/ssd1783.c
@@ -0,0 +1,257 @@
+/* Solomon SSD1783 LCD Driver (Epson S1D15G10D08B000 clone) */
+
+/* (C) 2010 by Steve Markgraf <steve@steve-m.de>
+ * (C) 2010 by Harald Welte <laforge@gnumonks.org>
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <stdint.h>
+#include <stdio.h>
+//#define DEBUG
+#include <debug.h>
+#include <delay.h>
+#include <uwire.h>
+#include <display.h>
+#include <display/ssd1783.h>
+#include <calypso/clock.h>
+
+#define LCD_COLUMNS 98
+#define LCD_ROWS 67
+#define LCD_TOP_FREE_ROWS 3
+#define LCD_LEFT_FREE_COLS 0
+#define PIXEL_BYTES 3
+#define SSD1783_UWIRE_BITLEN 9
+#define SSD1783_DEV_ID 0
+#define FONT_HEIGHT 8
+#define FONT_WIDTH 8
+
+static const uint8_t rgb8_palette[] ={
+ 0x00, //P01 Intermediate red tone 000
+ 0x03, //P02 Intermediate red tone 001
+ 0x05, //P03 Intermediate red tone 010
+ 0x07, //P04 Intermediate red tone 011
+ 0x09, //P05 Intermediate red tone 100
+ 0x0b, //P06 Intermediate red tone 101
+ 0x0d, //P07 Intermediate red tone 110
+ 0x0f, //P08 Intermediate red tone 111
+ 0x00, //P09 Intermediate green tone 000
+ 0x03, //P10 Intermediate green tone 001
+ 0x05, //P11 Intermediate green tone 010
+ 0x07, //P12 Intermediate green tone 011
+ 0x09, //P13 Intermediate green tone 100
+ 0x0b, //P14 Intermediate green tone 101
+ 0x0d, //P15 Intermediate green tone 110
+ 0x0f, //P16 Intermediate green tone 111
+ 0x00, //P17 Intermediate blue tone 00
+ 0x05, //P18 Intermediate blue tone 01
+ 0x0a, //P19 Intermediate blue tone 10
+ 0x0f, //P20 Intermediate blue tone 11
+};
+
+static void ssd1783_cmd_write(const uint8_t cmd)
+{
+ uint16_t cmd_out = cmd;
+ uwire_xfer(SSD1783_DEV_ID, SSD1783_UWIRE_BITLEN, &cmd_out, NULL);
+}
+
+static void ssd1783_data_write(const uint8_t data)
+{
+ uint16_t data_out = ((0x01 << 8) + data);
+ uwire_xfer(SSD1783_DEV_ID, SSD1783_UWIRE_BITLEN, &data_out, NULL);
+}
+
+static void ssd1783_clrscr(void)
+{
+ uint16_t i;
+
+ /* Select the whole display area for clearing */
+ ssd1783_cmd_write(CMD_PASET); /* Page address set [2] */
+ ssd1783_data_write(0x00); /* Start page: 0x00 */
+ ssd1783_data_write(LCD_ROWS-1); /* End page */
+ ssd1783_cmd_write(CMD_CASET); /* Column address set [2] */
+ ssd1783_data_write(0x00); /* Start column: 0x00 */
+ ssd1783_data_write((LCD_COLUMNS/2)-1); /* End column (2 pixels per column) */
+ ssd1783_cmd_write(CMD_RAMWR); /* Write to memory */
+
+ /* Fill the display with white */
+ for(i=0; i < (LCD_ROWS * (LCD_COLUMNS/2) * PIXEL_BYTES); i++){
+ ssd1783_data_write(0xff);
+ }
+ ssd1783_cmd_write(CMD_NOP); /* Terminate RAMWR with NOP */
+}
+
+static void ssd1783_init(void)
+{
+ unsigned int i;
+
+ calypso_reset_set(RESET_EXT, 0);
+ uwire_init();
+ delay_ms(3);
+
+ /* Begin SSD1783 initialization sequence */
+ ssd1783_cmd_write(CMD_OSCON); /* Internal OSC on */
+ ssd1783_cmd_write(CMD_SLPOUT); /* Sleep out (Leave sleep mode) */
+
+ ssd1783_cmd_write(CMD_COMSCN); /* Common scan direction [1] */
+ ssd1783_data_write(0x01); /* Scan 1 -> 68, 132 <- 69 */
+ ssd1783_cmd_write(CMD_DATCTL); /* Data Scan Direction [3] */
+ ssd1783_data_write(0x00); /* Normal page address, normal rotation,
+ * scan direction in column direction */
+ ssd1783_data_write(0x00); /* RGB arrangement: RGB-RGB */
+ ssd1783_data_write(0x02); /* Gray-scale setup: 16 gray-scale Type A, 8-bit mode */
+
+ /* Initialize RGB8 palette for 8-Bit color mode */
+ ssd1783_cmd_write(CMD_RGBSET8); /* 256-color position set [20] */
+ for(i=0; i < sizeof(rgb8_palette); i++){
+ ssd1783_data_write(rgb8_palette[i]);
+ }
+
+ ssd1783_cmd_write(CMD_DISCTL); /* Display control [3] */
+ ssd1783_data_write(0xff); /* no clock division, F1, F2 switching period = field */
+ ssd1783_data_write(0x10); /* Drive duty, P24 = 1 */
+ ssd1783_data_write(0x01); /* FR inverse set, P30=1 */
+ ssd1783_cmd_write(CMD_SCSTART); /* Scroll start set [1] */
+ ssd1783_data_write(0x00); /* Start block address 0x00 */
+
+ /* Turn on the power regulator which generates VLCD */
+ ssd1783_cmd_write(CMD_PWRCTR); /* Power Control [1] */
+ ssd1783_data_write(0x0b); /* Booster, follower and regulator circuit on */
+
+ /* FIXME: put this in a separate function (ssd1783_set_contrast) */
+ ssd1783_cmd_write(CMD_VOLCTR); /* Electronic Volume Control [2] */
+ ssd1783_data_write(0x29); /* Set contrast */
+ ssd1783_data_write(0x05); /* Set contrast */
+
+ ssd1783_cmd_write(CMD_DISINV); /* Invert Display */
+ ssd1783_cmd_write(CMD_TMPGRD); /* Temperature gradient set */
+ ssd1783_data_write(0x00); /* default temperature gradient (-0.05% / °C) */
+ ssd1783_cmd_write(CMD_BIASSET); /* Set biasing ratio [1] */
+ ssd1783_data_write(0x03); /* 1/10 bias */
+ ssd1783_cmd_write(CMD_FREQSET); /* Set frequency and n-line inversion [2] */
+ ssd1783_data_write(0x08); /* frequency: 75Hz (POR) */
+ ssd1783_data_write(0x06); /* n-line inversion: 6 lines */
+ ssd1783_cmd_write(CMD_RESCMD); /* reserved command in datasheet? */
+ ssd1783_cmd_write(CMD_PWMSEL); /* Select PWM/FRC, Full/8 color mode [3] */
+ ssd1783_data_write(0x28); /* fixed */
+ ssd1783_data_write(0x2c); /* 5 bits PWM + 1 bit FRC (POR) */
+ ssd1783_data_write(0x05); /* Full color mode (0x45 would be 8 color powersaving) */
+
+ ssd1783_cmd_write(CMD_DISON); /* Display ON */
+ ssd1783_clrscr(); /* Clear the display */
+}
+
+extern const unsigned char fontdata_r8x8_horiz[];
+
+/*
+ * Pixel format for 8-bit mode, 12-bit color, 2 Pixel per 3 byte
+ * D7, D6, D5, D4, D3, D2, D1, D0: RRRRGGGG (8 bits) 1st write
+ * D7, D6, D5, D4, D3, D2, D1, D0: BBBBRRRR (8 bits) 2nd write
+ * D7, D6, D5, D4, D3, D2, D1, D0: GGGGBBBB (8 bits) 3rd write
+*/
+
+static void ssd1783_goto_xy(int xpos, int ypos)
+{
+ ssd1783_cmd_write(CMD_PASET);
+ ssd1783_data_write(xpos);
+ ssd1783_data_write(xpos + (FONT_HEIGHT-1));
+
+ ssd1783_cmd_write(CMD_CASET);
+ ssd1783_data_write(ypos);
+ ssd1783_data_write(ypos + ((FONT_WIDTH/2)-1));
+
+ ssd1783_cmd_write(CMD_NOP);
+}
+
+static int ssd1783_putc_col(unsigned char c, int fColor, int bColor)
+{
+ int i, j;
+ uint8_t cols = FONT_WIDTH;
+ uint8_t rows = FONT_HEIGHT;
+ uint8_t row_slice;
+ uint8_t rowmask;
+ uint16_t pixel0; /* left pixel */
+ uint16_t pixel1; /* right pixel */
+
+ ssd1783_cmd_write(CMD_RAMWR);
+
+ for (i = 0; i < rows; i++) {
+ row_slice = fontdata_r8x8_horiz[(FONT_WIDTH * c)+i];
+ printd("\nSSD1783 FontData=0x%02hx", row_slice);
+ rowmask = 0x80;
+ for (j = 0; j < cols; j += 2) {
+ if (!(row_slice & rowmask))
+ pixel0 = bColor;
+ else
+ pixel0 = fColor;
+ rowmask = rowmask >> 1;
+ if (!(row_slice & rowmask))
+ pixel1 = bColor;
+ else
+ pixel1 = fColor;
+ rowmask = rowmask >> 1;
+ /* Write the RGB-RGB pixel data */
+ ssd1783_data_write((pixel0 >> 4) & 0xff);
+ ssd1783_data_write(((pixel0 & 0x00f) << 4) | ((pixel1 >> 8) & 0x00f));
+ ssd1783_data_write(pixel1 & 0xff);
+ }
+ }
+ ssd1783_cmd_write(CMD_NOP);
+
+ return c;
+}
+
+static int ssd1783_puts_col(const char *str, int txtline, int fColor, int bColor)
+{
+ int i;
+ for (i = 0; *str != 0x00; i += (FONT_WIDTH/2)) {
+ ssd1783_goto_xy(((txtline*FONT_HEIGHT)+LCD_TOP_FREE_ROWS),
+ (i + LCD_LEFT_FREE_COLS));
+ ssd1783_putc_col(*str++, fColor, bColor);
+ }
+
+ return 0;
+}
+
+/* interface to display driver core */
+
+static void ssd1783_set_attr(unsigned long attr)
+{
+ /* FIXME */
+}
+
+static int ssd1783_putc(unsigned int c)
+{
+ return ssd1783_putc_col(c, BLACK, WHITE);
+}
+
+static int ssd1783_puts(const char *str)
+{
+ return ssd1783_puts_col(str, 0, BLACK, WHITE);
+}
+
+const struct display_driver ssd1783_display = {
+ .name = "ssd1783",
+ .init = &ssd1783_init,
+ .set_attr = &ssd1783_set_attr,
+ .unset_attr = &ssd1783_set_attr,
+ .clrscr = &ssd1783_clrscr,
+ .goto_xy = &ssd1783_goto_xy,
+ .putc = &ssd1783_putc,
+ .puts = &ssd1783_puts,
+};
diff --git a/Src/osmolib/src/target/firmware/display/ssd1963.c b/Src/osmolib/src/target/firmware/display/ssd1963.c
new file mode 100644
index 0000000..49d5275
--- /dev/null
+++ b/Src/osmolib/src/target/firmware/display/ssd1963.c
@@ -0,0 +1,210 @@
+/* Solomon SSD1963 LCD Driver (probably not exactly the SSD1963)
+ * as used in the Sony Ericsson J100i */
+
+/* (C) 2010-11 by Steve Markgraf <steve@steve-m.de>
+ * (C) 2010 by Harald Welte <laforge@gnumonks.org>
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <stdint.h>
+#include <stdio.h>
+#include <debug.h>
+#include <delay.h>
+#include <uwire.h>
+#include <display.h>
+#include <calypso/clock.h>
+
+#define LCD_COLUMNS 96
+#define LCD_ROWS 64
+#define LCD_TOP_FREE_ROWS 3
+#define LCD_LEFT_FREE_COLS 0
+#define PIXEL_BYTES 3
+#define SSD1963_UWIRE_BITLEN 9
+#define SSD1963_DEV_ID 0
+#define FONT_HEIGHT 8
+#define FONT_WIDTH 8
+
+#define BLACK 0x0000
+#define WHITE 0x0fff
+
+static void ssd1963_cmd_write(const uint8_t cmd)
+{
+ uint16_t cmd_out = cmd;
+ uwire_xfer(SSD1963_DEV_ID, SSD1963_UWIRE_BITLEN, &cmd_out, NULL);
+}
+
+static void ssd1963_data_write(const uint8_t data)
+{
+ uint16_t data_out = ((0x01 << 8) + data);
+ uwire_xfer(SSD1963_DEV_ID, SSD1963_UWIRE_BITLEN, &data_out, NULL);
+}
+
+static void ssd1963_clrscr(void)
+{
+ uint16_t i;
+
+ /* Select the whole display area for clearing */
+ ssd1963_cmd_write(0x2b);
+ ssd1963_data_write(0x00);
+ ssd1963_data_write(LCD_ROWS-1);
+
+ ssd1963_cmd_write(0x2a);
+ ssd1963_data_write(0x00);
+ ssd1963_data_write(LCD_COLUMNS-1);
+
+ ssd1963_cmd_write(0x2c);
+
+ /* Fill the display with white */
+ for(i=0; i < (LCD_ROWS * (LCD_COLUMNS/2) * PIXEL_BYTES); i++){
+ ssd1963_data_write(0xff);
+ }
+}
+
+static void ssd1963_init(void)
+{
+ unsigned int i;
+
+ calypso_reset_set(RESET_EXT, 0);
+ uwire_init();
+ delay_ms(3);
+
+ /* Begin SSD1963 initialization sequence */
+ ssd1963_cmd_write(0xb6); /* Set vertical period */
+ ssd1963_data_write(0x4b);
+ ssd1963_data_write(0xf1);
+ ssd1963_data_write(0x40);
+ ssd1963_data_write(0x40);
+ ssd1963_data_write(0x00);
+ ssd1963_data_write(0x8c);
+ ssd1963_data_write(0x00);
+
+ ssd1963_cmd_write(0x3a); /* Set pixel format */
+ ssd1963_data_write(0x03); /* 0x03: 12 bit, 0x05: 16 Bit / pixel */
+ ssd1963_cmd_write(0x11);
+
+ /* Contrast/Electronic Volume Control */
+ ssd1963_cmd_write(0xba);
+ ssd1963_data_write(0x5b);
+ ssd1963_data_write(0x84);
+
+ ssd1963_cmd_write(0x36);
+ ssd1963_data_write(0x00);
+
+ ssd1963_cmd_write(0x13); /* Enter normal mode */
+ ssd1963_clrscr();
+
+ ssd1963_cmd_write(0x29); /* Display ON */
+}
+
+extern const unsigned char fontdata_r8x8_horiz[];
+
+/*
+ * Pixel format for 8-bit mode, 12-bit color, 2 Pixel per 3 byte
+ * D7, D6, D5, D4, D3, D2, D1, D0: RRRRGGGG (8 bits) 1st write
+ * D7, D6, D5, D4, D3, D2, D1, D0: BBBBRRRR (8 bits) 2nd write
+ * D7, D6, D5, D4, D3, D2, D1, D0: GGGGBBBB (8 bits) 3rd write
+*/
+
+static void ssd1963_goto_xy(int xpos, int ypos)
+{
+ ssd1963_cmd_write(0x2b);
+ ssd1963_data_write(xpos);
+ ssd1963_data_write(xpos + FONT_HEIGHT-1);
+
+ ssd1963_cmd_write(0x2a);
+ ssd1963_data_write(ypos);
+ ssd1963_data_write(ypos + FONT_WIDTH-1);
+}
+
+static int ssd1963_putc_col(unsigned char c, int fColor, int bColor)
+{
+ int i, j;
+ uint8_t cols = FONT_WIDTH;
+ uint8_t rows = FONT_HEIGHT;
+ uint8_t row_slice;
+ uint8_t rowmask;
+ uint16_t pixel0; /* left pixel */
+ uint16_t pixel1; /* right pixel */
+
+ ssd1963_cmd_write(0x2c);
+
+ for (i = 0; i < rows; i++) {
+ row_slice = fontdata_r8x8_horiz[(FONT_WIDTH * c)+i];
+ rowmask = 0x80;
+ for (j = 0; j < cols; j += 2) {
+ if (!(row_slice & rowmask))
+ pixel0 = bColor;
+ else
+ pixel0 = fColor;
+ rowmask = rowmask >> 1;
+ if (!(row_slice & rowmask))
+ pixel1 = bColor;
+ else
+ pixel1 = fColor;
+ rowmask = rowmask >> 1;
+ /* Write the RGB-RGB pixel data */
+ ssd1963_data_write((pixel0 >> 4) & 0xff);
+ ssd1963_data_write(((pixel0 & 0x00f) << 4) | ((pixel1 >> 8) & 0x00f));
+ ssd1963_data_write(pixel1 & 0xff);
+ }
+ }
+ ssd1963_cmd_write(0x00);
+
+ return c;
+}
+
+static int ssd1963_puts_col(const char *str, int txtline, int fColor, int bColor)
+{
+ int i;
+ for (i = 0; *str != 0x00; i += FONT_WIDTH) {
+ ssd1963_goto_xy(((txtline*FONT_HEIGHT)+LCD_TOP_FREE_ROWS),
+ (i + LCD_LEFT_FREE_COLS));
+ ssd1963_putc_col(*str++, fColor, bColor);
+ }
+
+ return 0;
+}
+
+/* interface to display driver core */
+
+static void ssd1963_set_attr(unsigned long attr)
+{
+ /* FIXME */
+}
+
+static int ssd1963_putc(unsigned int c)
+{
+ return ssd1963_putc_col(c, BLACK, WHITE);
+}
+
+static int ssd1963_puts(const char *str)
+{
+ return ssd1963_puts_col(str, 0, BLACK, WHITE);
+}
+
+const struct display_driver ssd1963_display = {
+ .name = "ssd1963",
+ .init = &ssd1963_init,
+ .set_attr = &ssd1963_set_attr,
+ .unset_attr = &ssd1963_set_attr,
+ .clrscr = &ssd1963_clrscr,
+ .goto_xy = &ssd1963_goto_xy,
+ .putc = &ssd1963_putc,
+ .puts = &ssd1963_puts,
+};
diff --git a/Src/osmolib/src/target/firmware/display/st7558.c b/Src/osmolib/src/target/firmware/display/st7558.c
new file mode 100644
index 0000000..b92c2de
--- /dev/null
+++ b/Src/osmolib/src/target/firmware/display/st7558.c
@@ -0,0 +1,121 @@
+/* Sitronix ST7558 LCD Driver */
+
+/* (C) 2010 by Harald Welte <laforge@gnumonks.org>
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <stdint.h>
+#include <stdio.h>
+
+#include <debug.h>
+#include <delay.h>
+#include <memory.h>
+#include <i2c.h>
+#include <display.h>
+#include <calypso/clock.h>
+
+#define MORE_CONTROL 0x80
+#define CONTROL_RS_RAM 0x40
+#define CONTROL_RS_CMD 0x00
+#define Y_ADDR(n) (0x40|((n)&0xf))
+#define X_ADDR(n) (0x80|((n)&0x3f))
+
+static const uint8_t setup[] = { CONTROL_RS_CMD, 0x2e, 0x21, 0x12, 0xc0, 0x0b,
+ 0x20, 0x11, 0x00, 0x40, 0x80 };
+static const uint8_t home[] = { CONTROL_RS_CMD, Y_ADDR(0), X_ADDR(0) };
+
+/* video modes */
+static const uint8_t invert[] = { CONTROL_RS_CMD, 0x20, 0x0d };
+static const uint8_t normal[] = { CONTROL_RS_CMD, 0x20, 0x0c };
+static const uint8_t off[] = { CONTROL_RS_CMD, 0x20, 0x08 };
+
+#define ST7558_SLAVE_ADDR 0x3c
+static int st7558_write(const uint8_t *data, int len)
+{
+ int rc = i2c_write(ST7558_SLAVE_ADDR, data[0], 1, data+1, len-1);
+ return rc;
+}
+
+static const uint8_t zero16[] = { CONTROL_RS_RAM,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0 };
+static void st7558_clrscr(void)
+{
+ int i;
+
+ st7558_write(home, sizeof(home));
+
+ for (i = 0; i < 102*9; i += 16)
+ st7558_write(zero16, sizeof(zero16));
+
+ st7558_write(home, sizeof(home));
+}
+
+static void st7558_init(void)
+{
+ /* Release nRESET */
+ calypso_reset_set(RESET_EXT, 0);
+
+ i2c_init(0,0);
+
+ st7558_write(setup, sizeof(setup));
+ st7558_clrscr();
+}
+
+static void st7558_set_attr(unsigned long attr)
+{
+ if (attr & DISP_ATTR_INVERT)
+ st7558_write(invert, sizeof(invert));
+}
+
+static void st7558_unset_attr(unsigned long attr)
+{
+ if (attr & DISP_ATTR_INVERT)
+ st7558_write(normal, sizeof(normal));
+}
+
+/* FIXME: we need a mini-libc */
+static void *mcpy(uint8_t *dst, const uint8_t *src, int len)
+{
+ while (len--)
+ *dst++ = *src++;
+
+ return dst;
+}
+
+extern const unsigned char fontdata_r8x8[];
+
+static void st7558_putc(unsigned char c)
+{
+ uint8_t putc_buf[16];
+ uint8_t bytes_per_char = 8;
+
+ putc_buf[0] = CONTROL_RS_RAM;
+ mcpy(putc_buf+1, fontdata_r8x8+(c*bytes_per_char), bytes_per_char);
+ st7558_write(putc_buf, 1+bytes_per_char);
+}
+
+const struct display_driver st7558_display = {
+ .name = "st7558",
+ .init = &st7558_init,
+ .clrscr = &st7558_clrscr,
+ .set_attr = &st7558_set_attr,
+ .unset_attr = &st7558_unset_attr,
+ .putc = &st7558_putc,
+};
diff --git a/Src/osmolib/src/target/firmware/display/td014.c b/Src/osmolib/src/target/firmware/display/td014.c
new file mode 100644
index 0000000..11ef3ea
--- /dev/null
+++ b/Src/osmolib/src/target/firmware/display/td014.c
@@ -0,0 +1,185 @@
+/* Toppoly TD014 LCD Driver, as used in the Motorola C139/C140 */
+
+/* (C) 2010 by Steve Markgraf <steve@steve-m.de>
+ * (C) 2010 by Harald Welte <laforge@gnumonks.org>
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <stdint.h>
+#include <stdio.h>
+
+#include <debug.h>
+#include <delay.h>
+#include <uwire.h>
+#include <display.h>
+#include <calypso/clock.h>
+
+#define LCD_COLUMNS 96
+#define LCD_ROWS 64
+#define LCD_TOP_FREE_ROWS 3
+#define LCD_LEFT_FREE_COLS 0
+#define PIXEL_BYTES 2
+#define TD014_UWIRE_BITLEN 9
+#define TD014_DEV_ID 0
+#define FONT_HEIGHT 8
+#define FONT_WIDTH 8
+
+#define BLACK 0x0000
+#define WHITE 0xffff
+
+static void td014_cmd_write(const uint8_t cmd)
+{
+ uint16_t cmd_out = cmd;
+ uwire_xfer(TD014_DEV_ID, TD014_UWIRE_BITLEN, &cmd_out, NULL);
+}
+
+static void td014_data_write(const uint8_t data)
+{
+ uint16_t data_out = ((0x01 << 8) + data);
+ uwire_xfer(TD014_DEV_ID, TD014_UWIRE_BITLEN, &data_out, NULL);
+}
+
+static void td014_clrscr(void)
+{
+ uint16_t i;
+
+ /* Select the whole display area for clearing */
+ td014_cmd_write(0x10);
+ td014_data_write(0x00);
+ td014_cmd_write(0x11);
+ td014_data_write(0x00);
+ td014_cmd_write(0x12);
+ td014_data_write(LCD_COLUMNS-1);
+ td014_cmd_write(0x13);
+ td014_data_write(LCD_ROWS-1);
+ td014_cmd_write(0x14);
+ td014_data_write(0x00);
+ td014_cmd_write(0x15);
+ td014_data_write(0x00);
+
+ /* Fill the display with white */
+ for(i=0; i < (LCD_ROWS * LCD_COLUMNS * PIXEL_BYTES); i++) {
+ td014_data_write(0xff);
+ }
+}
+
+static void td014_init(void)
+{
+ calypso_reset_set(RESET_EXT, 0);
+ uwire_init();
+ delay_ms(3);
+
+ td014_cmd_write(0x3f);
+ td014_data_write(0x01);
+ td014_cmd_write(0x20);
+ td014_data_write(0x03);
+ td014_cmd_write(0x31);
+ td014_data_write(0x03);
+
+ td014_clrscr();
+
+}
+
+extern const unsigned char fontdata_r8x8_horiz[];
+
+static void td014_goto_xy(int xpos, int ypos)
+{
+ td014_cmd_write(0x10);
+ td014_data_write(ypos);
+ td014_cmd_write(0x11);
+ td014_data_write(xpos);
+ td014_cmd_write(0x12);
+ td014_data_write(ypos + FONT_HEIGHT-1);
+ td014_cmd_write(0x13);
+ td014_data_write(xpos + FONT_WIDTH-1);
+ td014_cmd_write(0x14);
+ td014_data_write(ypos);
+ td014_cmd_write(0x15);
+ td014_data_write(xpos);
+
+}
+
+ /* RGB 556 Byte 1 | Byte 2 *
+ * Pixel format: RRRRRGGG|GGBBBBBB */
+
+static int td014_putc_col(unsigned char c, int fColor, int bColor)
+{
+ int i, j;
+ uint8_t cols = FONT_WIDTH;
+ uint8_t rows = FONT_HEIGHT;
+ uint8_t row_slice;
+ uint8_t rowmask;
+ uint16_t pixel;
+
+ for (i = 0; i < rows; i++) {
+ row_slice = fontdata_r8x8_horiz[(FONT_WIDTH * c)+i];
+ rowmask = 0x80;
+ for (j = 0; j < cols; j++) {
+ if (!(row_slice & rowmask))
+ pixel = bColor;
+ else
+ pixel = fColor;
+ rowmask = rowmask >> 1;
+ /* Write the pixel data */
+ td014_data_write((pixel >> 8) & 0xff);
+ td014_data_write(pixel & 0xff);
+ }
+ }
+ return c;
+}
+
+static int td014_puts_col(const char *str, int txtline, int fColor, int bColor)
+{
+ int i;
+ for (i = 0; *str != 0x00; i += FONT_WIDTH) {
+ td014_goto_xy(((txtline*FONT_HEIGHT)+LCD_TOP_FREE_ROWS),
+ (i + LCD_LEFT_FREE_COLS));
+ td014_putc_col(*str++, fColor, bColor);
+ }
+
+ return 0;
+}
+
+/* interface to display driver core */
+
+static void td014_set_attr(unsigned long attr)
+{
+ /* FIXME */
+}
+
+static int td014_putc(unsigned int c)
+{
+ return td014_putc_col(c, BLACK, WHITE);
+}
+
+static int td014_puts(const char *str)
+{
+ return td014_puts_col(str, 0, BLACK, WHITE);
+}
+
+const struct display_driver td014_display = {
+ .name = "td014",
+ .init = &td014_init,
+ .set_attr = &td014_set_attr,
+ .unset_attr = &td014_set_attr,
+ .clrscr = &td014_clrscr,
+ .goto_xy = &td014_goto_xy,
+ .putc = &td014_putc,
+ .puts = &td014_puts,
+};