aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/framebuffer.hpp
blob: 958a44b741f34f29449b9bcc127ed1c9edc978cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#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();