diff options
-rw-r--r-- | firmware/lib/vboot_ui.c | 5 | ||||
-rw-r--r-- | firmware/lib/vboot_ui_menu.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c index 640c4ff8..470e1500 100644 --- a/firmware/lib/vboot_ui.c +++ b/firmware/lib/vboot_ui.c @@ -153,6 +153,9 @@ int VbUserConfirms(struct vb2_context *ctx, uint32_t confirm_flags) return -1; } +/* Delay in developer ui */ +#define DEV_KEY_DELAY 20 /* Check keys every 20ms */ + static const char dev_disable_msg[] = "Developer mode is disabled on this device by system policy.\n" "For more information, see http://dev.chromium.org/chromium-os/fwmp\n" @@ -360,6 +363,8 @@ VbError_t vb2_developer_ui(struct vb2_context *ctx) VbCheckDisplayKey(ctx, key); break; } + + VbExSleepMs(DEV_KEY_DELAY); } while(vb2_audio_looping()); fallout: diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c index c050ec8e..8cd65af6 100644 --- a/firmware/lib/vboot_ui_menu.c +++ b/firmware/lib/vboot_ui_menu.c @@ -633,6 +633,8 @@ static VbError_t vb2_handle_menu_input(struct vb2_context *ctx, return VBERROR_KEEP_LOOPING; } +/* Delay in developer menu */ +#define DEV_KEY_DELAY 20 /* Check keys every 20ms */ /** * Main function that handles developer warning menu functionality * @@ -707,6 +709,8 @@ static VbError_t vb2_developer_menu(struct vb2_context *ctx) if (key != 0) vb2_audio_start(ctx); + VbExSleepMs(DEV_KEY_DELAY); + /* If dev mode was disabled, loop forever (never timeout) */ } while(disable_dev_boot ? 1 : vb2_audio_looping()); |