summaryrefslogtreecommitdiffstats
path: root/Src/osmocombb/src/target/firmware/include/display.h
diff options
context:
space:
mode:
authorTom2011-08-16 13:19:29 +0200
committerTom2011-08-16 13:19:29 +0200
commit7be0213030d2ce50e618e72b5a90e4c5b63c59a4 (patch)
tree98f7f3b0d38c863153f6d95a7129d867c43b652a /Src/osmocombb/src/target/firmware/include/display.h
parentremoved whole lib since compiled files were on index (diff)
downloadimsi-catcher-detection-7be0213030d2ce50e618e72b5a90e4c5b63c59a4.tar.gz
imsi-catcher-detection-7be0213030d2ce50e618e72b5a90e4c5b63c59a4.tar.xz
imsi-catcher-detection-7be0213030d2ce50e618e72b5a90e4c5b63c59a4.zip
checked in clean osmocombb lib
Diffstat (limited to 'Src/osmocombb/src/target/firmware/include/display.h')
-rw-r--r--Src/osmocombb/src/target/firmware/include/display.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/Src/osmocombb/src/target/firmware/include/display.h b/Src/osmocombb/src/target/firmware/include/display.h
new file mode 100644
index 0000000..89d02a5
--- /dev/null
+++ b/Src/osmocombb/src/target/firmware/include/display.h
@@ -0,0 +1,48 @@
+#ifndef _DISPLAY_DRIVER_H
+#define _DISPLAY_DRIVER_H
+
+enum display_attr {
+ DISP_ATTR_INVERT = 0x0001,
+};
+
+struct display_driver {
+ char *name;
+ void (*init)(void);
+ void (*set_attr)(unsigned long attr);
+ void (*unset_attr)(unsigned long attr);
+ void (*clrscr)(void);
+ void (*goto_xy)(int xpos, int ypos);
+ void (*set_color)(int fgcolor, int bgcolor);
+ int (*putc)(unsigned char c);
+ int (*puts)(const char *str);
+};
+
+extern struct display_driver *display;
+
+static inline void display_init(void)
+{
+ display->init();
+}
+static inline void display_set_attr(unsigned long attr)
+{
+ display->set_attr(attr);
+}
+static inline void display_unset_attr(unsigned long attr)
+{
+ display->unset_attr(attr);
+}
+static inline void display_clrscr(void)
+{
+ display->clrscr();
+}
+static inline int display_putchar(unsigned char c)
+{
+ return display->putc(c);
+}
+int display_puts(const char *s);
+
+extern const struct display_driver st7558_display;
+extern const struct display_driver ssd1783_display;
+extern const struct display_driver td014_display;
+
+#endif