summaryrefslogtreecommitdiff
path: root/examples/api/glue.c
diff options
context:
space:
mode:
authorChe-Liang Chiou <clchiou@chromium.org>2011-10-20 23:04:22 +0000
committerAnatolij Gustschin <agust@denx.de>2011-11-15 23:58:27 +0100
commita2a5729fc1247bb45d794e9d731c0b03bf58096f (patch)
treea89f1b03ebc2e3987b8068aefe0f0a30c1c357c4 /examples/api/glue.c
parentd3983ee85325d2be730830ebcf82585ee7cd2ecb (diff)
api: export LCD device to external apps
This patch exports LCD info-query and bitmap-rendering functions to external apps. This patch is tested on a Seaboard. Because the LCD driver is not yet upstreamed, the test was done in a local downstream repo. Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Diffstat (limited to 'examples/api/glue.c')
-rw-r--r--examples/api/glue.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/examples/api/glue.c b/examples/api/glue.c
index eff6a7e62f..d907e3f287 100644
--- a/examples/api/glue.c
+++ b/examples/api/glue.c
@@ -402,3 +402,34 @@ const char * ub_env_enum(const char *last)
return env_name;
}
+
+/****************************************
+ *
+ * display
+ *
+ ****************************************/
+
+int ub_display_get_info(int type, struct display_info *di)
+{
+ int err = 0;
+
+ if (!syscall(API_DISPLAY_GET_INFO, &err, (uint32_t)type, (uint32_t)di))
+ return API_ESYSC;
+
+ return err;
+}
+
+int ub_display_draw_bitmap(ulong bitmap, int x, int y)
+{
+ int err = 0;
+
+ if (!syscall(API_DISPLAY_DRAW_BITMAP, &err, bitmap, x, y))
+ return API_ESYSC;
+
+ return err;
+}
+
+void ub_display_clear(void)
+{
+ syscall(API_DISPLAY_CLEAR, NULL);
+}