got basic framebuffer
This commit is contained in:
parent
59f5fb2c6e
commit
baa0de8847
5 changed files with 155 additions and 1 deletions
30
include/framebuffer.h
Normal file
30
include/framebuffer.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include "stdint.h"
|
||||
|
||||
struct FrameBuffer
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
} physicalDisplay;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t xOffset;
|
||||
uint32_t yOffset;
|
||||
} virtualDisplay;
|
||||
|
||||
uint32_t pitch;
|
||||
uint32_t bitsPerPixel;
|
||||
uint8_t* pixels;
|
||||
uint32_t size;
|
||||
};
|
||||
|
||||
struct FrameBuffer* framebuffer_init(unsigned int width, unsigned int height);
|
||||
void framebuffer_release(void);
|
||||
|
||||
void draw_test_image(void);
|
|
@ -2,5 +2,9 @@
|
|||
|
||||
#include "stdint.h"
|
||||
|
||||
struct FrameBuffer;
|
||||
|
||||
uint32_t get_vc_firmware_rev(void);
|
||||
uint8_t* get_board_mac_address(uint8_t* buffer);
|
||||
uint8_t* get_board_mac_address(uint8_t* buffer);
|
||||
|
||||
void create_framebuffer(struct FrameBuffer* buffer, unsigned int width, unsigned int height);
|
Loading…
Add table
Add a link
Reference in a new issue