summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2013-03-23 14:50:40 +0000
committerAnatolij Gustschin <agust@denx.de>2013-03-29 09:35:33 +0100
commitfc9d64ffcd94c1e22675830eae13956cc4fd822d (patch)
treef14a977c82a3fb1ee3f606d71f8c1ff5306ee1f1 /board
parent009d75ccc11d27b9a083375a88bb93cb746b4800 (diff)
menu: Add support for user defined item choice function
Selecting menu items is currently done in menu_interactive_choice() by reading the user input strings from standard input. Extend menu_interactive_choice() to support user defined function for selecting menu items. This function and its argument can be specified when creating the menu. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'board')
-rw-r--r--board/ait/cam_enc_4xx/cam_enc_4xx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/board/ait/cam_enc_4xx/cam_enc_4xx.c b/board/ait/cam_enc_4xx/cam_enc_4xx.c
index 32b28f9270..644c445693 100644
--- a/board/ait/cam_enc_4xx/cam_enc_4xx.c
+++ b/board/ait/cam_enc_4xx/cam_enc_4xx.c
@@ -561,7 +561,8 @@ static char *menu_handle(struct menu_display *display)
char *s;
char temp[6][200];
- m = menu_create(display->title, display->timeout, 1, ait_menu_print);
+ m = menu_create(display->title, display->timeout, 1, ait_menu_print,
+ NULL, NULL);
for (i = 0; display->menulist[i]; i++) {
sprintf(key, "%d", i + 1);