| Message ID | 20251010034255.1099728-5-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1760067813; bh=TOf1TZgy9POoeXM22CJ+DywjT9eZs7JmeB/ayZrwSNE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=o9LFWfdqP52X13CZF9kNogKjl2C3k55Y2PT8RrtjPXayqMJd/es/3GCstcn9+3tQ3 mMH+1LWQ9GzDGsA+OwhZI1DmGBO9DxGPlhVDZ/gjmiDxDF3485wWOQR/MeCc4ccBZ8 UzEYRCK8isNyF6CRfAv4LlqzjGmjcG5JcpyqITUjR6KdVu9NrXQooYnk+PCG47NKSP 5Qsvd1Ga5r2KfKk4y7SvoP5SZxbCbqUnyLtgTKCMxKMjndjVgiHr8CUhUo0Ro41Us3 QSyjp3AeSZqVR7rk2KkstpGi+2C6u6tihFwhF2/HQFuQOvVLFLHT7nzrDlmEfGLJMH 4oa0EGzqlK1Cg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 256676806A for <u-boot-concept@u-boot.org>; Thu, 9 Oct 2025 21:43:33 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id y2R2PgdGxj_a for <u-boot-concept@u-boot.org>; Thu, 9 Oct 2025 21:43:33 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1760067813; bh=TOf1TZgy9POoeXM22CJ+DywjT9eZs7JmeB/ayZrwSNE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=o9LFWfdqP52X13CZF9kNogKjl2C3k55Y2PT8RrtjPXayqMJd/es/3GCstcn9+3tQ3 mMH+1LWQ9GzDGsA+OwhZI1DmGBO9DxGPlhVDZ/gjmiDxDF3485wWOQR/MeCc4ccBZ8 UzEYRCK8isNyF6CRfAv4LlqzjGmjcG5JcpyqITUjR6KdVu9NrXQooYnk+PCG47NKSP 5Qsvd1Ga5r2KfKk4y7SvoP5SZxbCbqUnyLtgTKCMxKMjndjVgiHr8CUhUo0Ro41Us3 QSyjp3AeSZqVR7rk2KkstpGi+2C6u6tihFwhF2/HQFuQOvVLFLHT7nzrDlmEfGLJMH 4oa0EGzqlK1Cg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1537368030 for <u-boot-concept@u-boot.org>; Thu, 9 Oct 2025 21:43:33 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1760067810; bh=qhAmaFcJUY3bwd7KFpWVPrDBdSpUOFKH+AmETliX7zQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f0RhABEv2pcxabWNHfPelHE0zfFFLJNaJgUvJseiTaO4ZQw5oM59MN+IQxTY6oddw egV2/sxVIYnRlU6imiLP4wnxPZiWoDBP469u3t0kHzCh8RnIx8KcmTYj2hLUvX43jW cBO+t+GS1+i9B4y8ceJpa+PyV86Llm49LnTtBxoC6KfYpHgARoFr+arZEj+C3UlaLr oXZsFXo8/aPldOf7WbGA4vq6eZ0QC36oxCoBcM24qbUIeKeiyMPYg+B/4ld9vlklgX PtY//55pCkblk2QMNsTr9uVb3hcBurEVnVw1qYbDgINQX0fpV1hGMqsnINmHu1j/Nr p02KEjih+FF2Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id ECA6F67F7F; Thu, 9 Oct 2025 21:43:30 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id JHQ_lrX0sxRY; Thu, 9 Oct 2025 21:43:30 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1760067803; bh=QSBG5Or0zLqwl0oWN2TqRp5Qbf6dyk8d8LkMd4I30/0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CycZF7HjM/lFVOlmvoCZ1nTCUTg4Xu9Mum+vOTfTfYkW+XTusYGY0q+T4gCJFBxwe 19CBm+U4+rPd+wbPLRIeUbvu62nkK8obucSmrJibI0ts1nVxGZSMSlDgbRkZ5GWziv aNvFDYWsF3ewp9NFg4yEzL3dSxhtrE6W+r2Jx3U4tudJR3wfOHRwVH8Q0835is9CS2 xQm8ttKtymKXS2nkftBYitaLww9xv1BTHsIDGZCbY06kZPks3nYYA6okZp44SeajeL GJmGWmXBGk6iRclBdEMuMII4WGAN9XX4Vdk0p29QVgyMoqYLNo58Wlmawe0x+UGXya +V+9Goibam3QQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 65E2067FA3; Thu, 9 Oct 2025 21:43:23 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Thu, 9 Oct 2025 21:42:32 -0600 Message-ID: <20251010034255.1099728-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251010034255.1099728-1-sjg@u-boot.org> References: <20251010034255.1099728-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: M2BMIMG7MBMLT7JFHM4YNILX4RVTJHLK X-Message-ID-Hash: M2BMIMG7MBMLT7JFHM4YNILX4RVTJHLK X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 04/18] expo: Correct key-polling timeout List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/M2BMIMG7MBMLT7JFHM4YNILX4RVTJHLK/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
expo: Extend the boot menu
|
|
Commit Message
Simon Glass
Oct. 10, 2025, 3:42 a.m. UTC
From: Simon Glass <sjg@chromium.org> When a character is received it should reset the timeout, even if the character does not result in output from cli_ch_process() Fix this, so that keypresses which consist of escape codes are correctly interpreted. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: a5c5b3b2fb6 ("expo: Speed up polling the keyboard") --- boot/expo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/boot/expo.c b/boot/expo.c index 5704dd9fecc..1fb6d6e9417 100644 --- a/boot/expo.c +++ b/boot/expo.c @@ -486,17 +486,17 @@ int expo_iter_scene_objs(struct expo *exp, expo_scene_obj_iterator iter, static int poll_keys(struct expo *exp) { - int ichar, key; + int ch = 0, ichar, key; ichar = cli_ch_process(&exp->cch, 0); if (!ichar) { /* Check once for available input */ if (tstc()) { - ichar = getchar(); - ichar = cli_ch_process(&exp->cch, ichar); + ch = getchar(); + ichar = cli_ch_process(&exp->cch, ch); } - if (!ichar && get_timer(exp->last_key_ms) >= 10) + if (!ch && get_timer(exp->last_key_ms) >= 10) ichar = cli_ch_process(&exp->cch, -ETIMEDOUT); }