console.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * (C) Copyright 2000-2009
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef __CONSOLE_H
  8. #define __CONSOLE_H
  9. extern char console_buffer[];
  10. /* common/console.c */
  11. int console_init_f(void); /* Before relocation; uses the serial stuff */
  12. int console_init_r(void); /* After relocation; uses the console stuff */
  13. int console_assign(int file, const char *devname); /* Assign the console */
  14. int ctrlc(void);
  15. int had_ctrlc(void); /* have we had a Control-C since last clear? */
  16. void clear_ctrlc(void); /* clear the Control-C condition */
  17. int disable_ctrlc(int); /* 1 to disable, 0 to enable Control-C detect */
  18. int confirm_yesno(void); /* 1 if input is "y", "Y", "yes" or "YES" */
  19. /**
  20. * console_record_init() - set up the console recording buffers
  21. *
  22. * This should be called as soon as malloc() is available so that the maximum
  23. * amount of console output can be recorded.
  24. */
  25. int console_record_init(void);
  26. /**
  27. * console_record_reset() - reset the console recording buffers
  28. *
  29. * Removes any data in the buffers
  30. */
  31. void console_record_reset(void);
  32. /**
  33. * console_record_reset_enable() - reset and enable the console buffers
  34. *
  35. * This should be called to enable the console buffer.
  36. */
  37. void console_record_reset_enable(void);
  38. /*
  39. * CONSOLE multiplexing.
  40. */
  41. #ifdef CONFIG_CONSOLE_MUX
  42. #include <iomux.h>
  43. #endif
  44. #endif