mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
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>
This commit is contained in:
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user