tty.h 405 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include <asm/port_io.h>
  3. #define STRUCT_TTY_NAME_LEN (32)
  4. struct tty;
  5. struct tty_operations
  6. {
  7. void (*put_char)(struct tty* p_tty, char c);
  8. };
  9. struct tty
  10. {
  11. char name[STRUCT_TTY_NAME_LEN];
  12. struct tty_operations* ops;
  13. char data[12];
  14. };
  15. void tty_print(struct tty* p_tty, const char* str);
  16. int make_serial_tty(struct tty* p_tty, int id);
  17. int make_vga_tty(struct tty* p_tty);