aboutsummaryrefslogtreecommitdiff
path: root/include/cedit.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-08-14 16:40:27 -0600
committerTom Rini <trini@konsulko.com>2023-08-25 13:54:33 -0400
commit8d0f890a0b9b0f7bf0b529f18f81a45ec6f64eb1 (patch)
treec1bd74a67e3b4340b9969c37dfee3941480741d2 /include/cedit.h
parentf80ebb2fe10b8e31226424d46adbedd86768a9df (diff)
downloadu-boot-8d0f890a0b9b0f7bf0b529f18f81a45ec6f64eb1.zip
u-boot-8d0f890a0b9b0f7bf0b529f18f81a45ec6f64eb1.tar.gz
u-boot-8d0f890a0b9b0f7bf0b529f18f81a45ec6f64eb1.tar.bz2
expo: Add a function to prepare a cedit
Split out the code which prepares the cedit for use, so we can call it from a test. Add a log category while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/cedit.h')
-rw-r--r--include/cedit.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/cedit.h b/include/cedit.h
index 21de12d..851d8e8 100644
--- a/include/cedit.h
+++ b/include/cedit.h
@@ -8,6 +8,7 @@
#define __CEDIT_H
struct expo;
+struct scene;
struct video_priv;
/**
@@ -30,4 +31,18 @@ int cedit_arange(struct expo *exp, struct video_priv *vid_priv, uint scene_id);
*/
int cedit_run(struct expo *exp);
+/**
+ * cedit_prepare() - Prepare to run a cedit
+ *
+ * Set up the video device, select the first scene and highlight the first item.
+ * This ensures that all menus have a selected item.
+ *
+ * @exp: Expo to use
+ * @vid_privp: Set to private data for the video device
+ * @scnp: Set to the first scene
+ * Return: scene ID of first scene if OK, -ve on error
+ */
+int cedit_prepare(struct expo *exp, struct video_priv **vid_privp,
+ struct scene **scnp);
+
#endif /* __CEDIT_H */