|
ginnOS
The reference: libc, the libraries and the kernel
|
Macros | |
| #define | VGA_TEXT_PHYS 0xB8000u |
| #define | VGA_TEXT_BUFFER ((volatile uint16_t *)phys_to_virt(VGA_TEXT_PHYS)) |
| #define | VGA_WIDTH 80u |
| #define | VGA_HEIGHT 25u |
| #define | VGA_DEFAULT_FOREGROUND VGA_LIGHT_GREY |
| #define | VGA_DEFAULT_BACKGROUND VGA_BLACK |
| #define | VGA_CRTC_INDEX_PORT 0x3D4u |
| #define | VGA_CRTC_DATA_PORT 0x3D5u |
Functions | |
| void | vga_put_at (char c, uint8_t row, uint8_t col) |
| write a character at an explicit screen location. | |
| void | vga_scroll (void) |
| scroll the text buffer up by one row and move the cursor to the last row. | |
| void | vga_set_color (uint8_t fg, uint8_t bg) |
| sets the foreground and background colors for text output. | |
| void | vga_clear (void) |
| clears the VGA text buffer and resets the cursor position to the top left corner. | |
| void | vga_putchar (char c) |
| writes a single character to the VGA text buffer at the current cursor position. | |
| void | vga_write (const char *str) |
| writes a null-terminated string to the VGA text buffer starting at the current cursor position. | |
| void | vga_initialize (void) |
| initializes the VGA driver. | |
| void | vga_set_cursor (uint8_t row, uint8_t col) |
| set the cursor position to the specified row and column. | |
| void | vga_get_cursor (uint8_t *row, uint8_t *col) |
| get the current cursor position. | |
| #define VGA_TEXT_PHYS 0xB8000u |
| #define VGA_TEXT_BUFFER ((volatile uint16_t *)phys_to_virt(VGA_TEXT_PHYS)) |
| #define VGA_WIDTH 80u |
| #define VGA_HEIGHT 25u |
| #define VGA_DEFAULT_FOREGROUND VGA_LIGHT_GREY |
| #define VGA_DEFAULT_BACKGROUND VGA_BLACK |
| #define VGA_CRTC_INDEX_PORT 0x3D4u |
| #define VGA_CRTC_DATA_PORT 0x3D5u |
write a character at an explicit screen location.
invalid row/column values are ignored.
| void vga_scroll | ( | void | ) |
scroll the text buffer up by one row and move the cursor to the last row.
sets the foreground and background colors for text output.
| foreground | the foreground color. |
| background | the background color. |
| void vga_clear | ( | void | ) |
clears the VGA text buffer and resets the cursor position to the top left corner.
| void vga_putchar | ( | char | c | ) |
writes a single character to the VGA text buffer at the current cursor position.
| c | the character to write. |
| void vga_write | ( | const char * | str | ) |
writes a null-terminated string to the VGA text buffer starting at the current cursor position.
| str | the string to write. |
| void vga_initialize | ( | void | ) |
initializes the VGA driver.
must be called before any other VGA functions.
set the cursor position to the specified row and column.
| row | the row to set the cursor to. |
| col | the column to set the cursor to. |