bootretry.h 672 B

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