This patch factors out the wait-for-key-press loop from the shell command "timeout" into a sparate file, so that it can be used from C, too. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 lines
334 B
C
12 lines
334 B
C
#ifndef __CONSOLE_COUNTDOWN_H
|
|
#define __CONSOLE_COUNTDOWN_H
|
|
|
|
#define CONSOLE_COUNTDOWN_SILENT (1 << 0)
|
|
#define CONSOLE_COUNTDOWN_ANYKEY (1 << 1)
|
|
#define CONSOLE_COUNTDOWN_RETURN (1 << 3)
|
|
#define CONSOLE_COUNTDOWN_CTRLC (1 << 4)
|
|
|
|
int console_countdown(int timeout_s, unsigned flags, char *out_key);
|
|
|
|
#endif /* __CONSOLE_COUNTDOWN_H */
|