barebox/include/console_countdown.h
Marc Kleine-Budde 1aa3dbfc1a timeout: factor out wait-for-key-press loop into separate file
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>
2015-04-23 08:12:28 +02:00

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 */