]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - examples/api/glue.c
x86: minnowmax: Add access to GPIOs E0, E1, E2
[karo-tx-uboot.git] / examples / api / glue.c
index eff6a7e62f515806036efb3f6f9b7ea5a73b5054..d619518d42a64a19c0ba6ea61e0c0b1c9cd930f6 100644 (file)
@@ -1,24 +1,7 @@
 /*
  * (C) Copyright 2007-2008 Semihalf, Rafal Jaworowski <raj@semihalf.com>
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * 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., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -402,3 +385,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);
+}