blob: 025c29d526ac871f1cd1edb00d9168cac9fa598d [file] [log] [blame]
Simon Glass0098e172014-04-10 20:01:30 -06001/*
2 * (C) Copyright 2000
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#ifndef __bootretry_h
9#define __bootretry_h
10
11#ifdef CONFIG_BOOT_RETRY_TIME
12/**
13 * bootretry_tstc_timeout() - ensure we get a keypress before timeout
14 *
15 * Check for a keypress repeatedly, resetting the watchdog each time. If a
16 * keypress is not received within the command timeout, return an error.
17 *
18 * @return 0 if a key is received in time, -ETIMEDOUT if not
19 */
20int bootretry_tstc_timeout(void);
21#else
22static inline int bootretry_tstc_timeout(void)
23{
24 return 0;
25}
26#endif
27
28void init_cmd_timeout(void);
29void reset_cmd_timeout(void);
30
31#endif