2026-06-26 20:05:01 -05:00
|
|
|
#ifndef DVGA_H
|
|
|
|
|
#define DVGA_H
|
|
|
|
|
|
2026-07-10 07:46:46 -05:00
|
|
|
#include <vfs.h>
|
2026-07-14 17:40:30 -05:00
|
|
|
#include <lib/font.h>
|
|
|
|
|
|
2026-07-15 08:07:06 -05:00
|
|
|
#define VGA_FRAMEBUFFER 0xF0000000
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
uint8_t b;
|
|
|
|
|
uint8_t g;
|
|
|
|
|
uint8_t r;
|
|
|
|
|
uint8_t a;
|
|
|
|
|
} vga_color_t;
|
|
|
|
|
|
|
|
|
|
extern vga_color_t VGA_COLOR_BLACK;
|
|
|
|
|
extern vga_color_t VGA_COLOR_RED;
|
|
|
|
|
extern vga_color_t VGA_COLOR_GREEN;
|
|
|
|
|
extern vga_color_t VGA_COLOR_BLUE;
|
2026-07-16 14:44:08 -05:00
|
|
|
extern vga_color_t VGA_COLOR_ROCKOS;
|
2026-07-10 07:46:46 -05:00
|
|
|
|
2026-07-14 00:07:50 -05:00
|
|
|
void vga_init(
|
2026-07-16 14:44:08 -05:00
|
|
|
vfs_node_t* dev,
|
2026-07-14 17:40:30 -05:00
|
|
|
uint32_t fb_paddr,
|
2026-07-14 00:07:50 -05:00
|
|
|
uint32_t fb_width,
|
|
|
|
|
uint32_t fb_height,
|
|
|
|
|
uint32_t fb_pitch,
|
2026-07-16 14:44:08 -05:00
|
|
|
uint8_t fb_bpp
|
2026-07-14 00:07:50 -05:00
|
|
|
);
|
|
|
|
|
|
2026-07-15 08:07:06 -05:00
|
|
|
uint32_t vga_get_framebuffer();
|
|
|
|
|
uint32_t vga_get_width();
|
|
|
|
|
uint32_t vga_get_height();
|
2026-07-14 17:40:30 -05:00
|
|
|
uint32_t vga_get_pitch();
|
2026-07-15 08:07:06 -05:00
|
|
|
uint8_t vga_get_bpp();
|
2026-07-14 17:40:30 -05:00
|
|
|
|
2026-07-14 00:07:50 -05:00
|
|
|
void vga_clear_scrn(uint32_t color);
|
2026-06-26 20:05:01 -05:00
|
|
|
|
2026-07-10 07:46:46 -05:00
|
|
|
uint32_t vga_write(vfs_node_t* node, uint32_t offset, uint32_t size, uint8_t* buf);
|
|
|
|
|
|
2026-06-26 20:05:01 -05:00
|
|
|
#endif
|