vga.h 451 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #ifndef _KERNEL_VGA_H_
  3. #define _KERNEL_VGA_H_
  4. #include <types/stdint.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. struct vga_char {
  9. int8_t c;
  10. uint8_t color;
  11. };
  12. #define VGA_MEM ((struct vga_char*)0xb8000)
  13. #define VGA_SCREEN_WIDTH_IN_CHARS (80U)
  14. #define VGA_SCREEN_HEIGHT_IN_CHARS (25U)
  15. void vga_put_char(struct vga_char* c);
  16. void vga_printk(const char* str, uint8_t color);
  17. #ifdef __cplusplus
  18. }
  19. #endif
  20. #endif // _KERNEL_VGA_H_