aboutsummaryrefslogtreecommitdiffstats
path: root/display.c
diff options
context:
space:
mode:
authorreinelt <>2000-01-16 12:17:59 +0000
committerreinelt <>2000-01-16 12:17:59 +0000
commit991cae8c076d9da475bf833186219b3d2a396f29 (patch)
treee884a890843544c3039c1af4c58e43e45b642018 /display.c
downloadlcd4linux-991cae8c076d9da475bf833186219b3d2a396f29.tar.gz
[lcd4linux @ 2000-01-16 12:17:59 by reinelt]
Initial revision
Diffstat (limited to 'display.c')
-rw-r--r--display.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/display.c b/display.c
new file mode 100644
index 0000000..d154b67
--- /dev/null
+++ b/display.c
@@ -0,0 +1,57 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "display.h"
+
+extern DISPLAY MatrixOrbital[];
+
+FAMILY Driver[] = {
+ { "MatrixOrbital", MatrixOrbital },
+ { "" }
+};
+
+
+static DISPLAY *Display = NULL;
+
+int lcd_init (char *display)
+{
+ int i, j;
+ for (i=0; Driver[i].name[0]; i++) {
+ for (j=0; Driver[i].Display[j].name[0]; j++) {
+ if (strcmp (Driver[i].Display[j].name, display)==0) {
+ Display=&Driver[i].Display[j];
+ return Display->init();
+ }
+ }
+ }
+ fprintf (stderr, "lcd_init(%s) failed: no such display\n", display);
+ return -1;
+}
+
+int lcd_clear (void)
+{
+ return 0;
+}
+
+int lcd_put (int x, int y, char *text)
+{
+ return 0;
+}
+
+int lcd_bar (int type, int x, int y, int max, int len1, int len2)
+{
+ return 0;
+}
+
+int lcd_flush (void)
+{
+ return 0;
+}
+
+void main (void) {
+ int i, j;
+
+ lcd_init ("junk");
+ lcd_init ("LCD2041");
+
+}