You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

serial_console.c 651B

12345678910111213141516171819202122232425262728293031
  1. #include <gpxe/init.h>
  2. #include <gpxe/serial.h>
  3. #include "console.h"
  4. /** @file
  5. *
  6. * Serial console
  7. *
  8. */
  9. struct console_driver serial_console __console_driver;
  10. static void serial_console_init ( void ) {
  11. /* Serial driver initialization should already be done,
  12. * time to enable the serial console. */
  13. serial_console.disabled = 0;
  14. }
  15. struct console_driver serial_console __console_driver = {
  16. .putchar = serial_putc,
  17. .getchar = serial_getc,
  18. .iskey = serial_ischar,
  19. .disabled = 1,
  20. };
  21. /**
  22. * Serial console initialisation function
  23. */
  24. struct init_fn serial_console_init_fn __init_fn ( INIT_CONSOLE ) = {
  25. .initialise = serial_console_init,
  26. };