]> git.ipfire.org Git - people/ms/u-boot.git/blob - include/bootretry.h
Move bootretry code into bootretry.c and clean up
[people/ms/u-boot.git] / include / bootretry.h
1 /*
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 */
20 int bootretry_tstc_timeout(void);
21 #else
22 static inline int bootretry_tstc_timeout(void)
23 {
24 return 0;
25 }
26 #endif
27
28 void init_cmd_timeout(void);
29 void reset_cmd_timeout(void);
30
31 #endif