]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - examples/api/glue.c
api: export LCD device to external apps
[karo-tx-uboot.git] / examples / api / glue.c
index eff6a7e62f515806036efb3f6f9b7ea5a73b5054..d907e3f2875baef3da2a2c9ad3778e7de2564d36 100644 (file)
@@ -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);
+}