rulimine/common/lib/fb.h

34 lines
714 B
C
Raw Normal View History

2021-03-02 08:21:05 +03:00
#ifndef __LIB__FB_H__
#define __LIB__FB_H__
#include <stdint.h>
struct resolution {
2022-05-22 07:38:34 +03:00
uint64_t width;
uint64_t height;
uint16_t bpp;
};
2021-03-02 08:21:05 +03:00
struct fb_info {
2021-04-11 03:30:48 +03:00
bool default_res;
2021-03-02 08:21:05 +03:00
uint8_t memory_model;
uint64_t framebuffer_addr;
2022-05-22 07:38:34 +03:00
uint64_t framebuffer_pitch;
uint64_t framebuffer_width;
uint64_t framebuffer_height;
2021-03-02 08:21:05 +03:00
uint16_t framebuffer_bpp;
uint8_t red_mask_size;
uint8_t red_mask_shift;
uint8_t green_mask_size;
uint8_t green_mask_shift;
uint8_t blue_mask_size;
uint8_t blue_mask_shift;
};
bool fb_init(struct fb_info *ret,
2022-05-22 07:38:34 +03:00
uint64_t target_width, uint64_t target_height, uint16_t target_bpp);
2021-03-02 08:21:05 +03:00
2021-04-04 05:02:05 +03:00
void fb_clear(struct fb_info *fb);
2021-03-02 08:21:05 +03:00
#endif