diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2021-04-26 12:37:34 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2021-04-26 12:37:34 +0200 |
| commit | 9dc527b3be9d493dcf8cf1baf78477373eb5990d (patch) | |
| tree | 0b32c28e57fc5a6a3e6210d9a601dfdbfe246cd8 /src/drivers/framebuffer.hpp | |
| parent | 7db6db5ae64e7ab2626bbd898c63f58e053dc1a6 (diff) | |
Enable psf font for framebuffer display
Diffstat (limited to 'src/drivers/framebuffer.hpp')
| -rw-r--r-- | src/drivers/framebuffer.hpp | 53 |
1 files changed, 23 insertions, 30 deletions
diff --git a/src/drivers/framebuffer.hpp b/src/drivers/framebuffer.hpp index fb09d6f..958a44b 100644 --- a/src/drivers/framebuffer.hpp +++ b/src/drivers/framebuffer.hpp @@ -1,33 +1,26 @@ #pragma once -#include "core/types.hpp" - -typedef enum VIDEO_COLORS { - BLACK=0, BLUE=1, GREEN=2,CYAN=3, RED=4,PURPLE=5,BROWN=6,GRAY=7, - DARK_GRAY=8,LIGHT_BLUE=9,LIGHT_GREEN=10,LIGHT_CYAN=11,LIGHT_RED=12,LIGHT_PURPLE=13,YELLOW=14,WHITE=15 - -} VIDEO_COLORS; - -typedef struct VIDEO_STATE { - u8 *mem; - u8 col; - u8 line; - u8 bg; - u8 fg; -} VIDEO_STATE; - -/** - * Print char - */ -void putchar(char); - -/** - * Scroll the framebuffer from one line - */ -void scrollup(); - -/** - * Clear all char from the framebuffer - */ -void clear(); +#include "include/boucane.hpp" +typedef struct { + u32 pitch; + u32 depth; + u64 location; + u32 width; + u32 height; +} __attribute__((packed)) FB_CFG; + +typedef struct { + u32 x,y; + u8 r,g,b,a; +} __attribute__((packed)) FB_PIXEL; + +extern FB_CFG fb_cfg; + +void framebuffer_init(FB_CFG config); + +void framebuffer_draw(FB_PIXEL p); + +void framebuffer_scrollup(u32 npixel); + +void framebuffer_clear();
\ No newline at end of file |
