aboutsummaryrefslogtreecommitdiff
path: root/include/menu.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-06 08:52:35 -0600
committerTom Rini <trini@konsulko.com>2023-01-16 18:26:50 -0500
commit9e7ac0b0be5cb663e539716554d66f8f0890ca83 (patch)
tree74f0cbd7b08352973af302a10820dab740e76a25 /include/menu.h
parent24d8e1b37b90760a6c9867f37210aa4b1f2e8f63 (diff)
menu: Factor out menu-keypress decoding
Move this code into a separate function so that it can be used in the new VBE menu. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/menu.h')
-rw-r--r--include/menu.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/menu.h b/include/menu.h
index 3996075a33..1e88141d6b 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -53,6 +53,8 @@ enum bootmenu_key {
BKEY_PLUS,
BKEY_MINUS,
BKEY_SPACE,
+
+ BKEY_COUNT,
};
/**
@@ -101,4 +103,12 @@ enum bootmenu_key bootmenu_autoboot_loop(struct bootmenu_data *menu,
enum bootmenu_key bootmenu_loop(struct bootmenu_data *menu,
struct cli_ch_state *cch);
+/**
+ * bootmenu_conv_key() - Convert a U-Boot keypress into a menu key
+ *
+ * @ichar: Keypress to convert (ASCII, including control characters)
+ * Returns: Menu key that corresponds to @ichar, or BKEY_NONE if none
+ */
+enum bootmenu_key bootmenu_conv_key(int ichar);
+
#endif /* __MENU_H__ */