-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathframebuffer.h
More file actions
56 lines (40 loc) · 1.03 KB
/
Copy pathframebuffer.h
File metadata and controls
56 lines (40 loc) · 1.03 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// SPDX-License-Identifier: LGPL-3.0-or-later
// Header file for framebuffer backend abstraction
#ifndef FRAMEBUFFER_H
#define FRAMEBUFFER_H
#include "common.h"
#ifdef HAVE_LIBDRM
#include "backend/drm.h"
#endif
#include "backend/fbdev.h"
#define BACKEND_NONE 0
#define BACKEND_FBDEV 1
#define BACKEND_DRM 2
extern int activeBackend;
extern int reinitDelay;
typedef struct {
uint32_t width; // Screen width in pixels
uint32_t height; // Screen height in pixels
uint32_t stride; // Aligned value of bytes per line
uint32_t start; // Current frame vertical offset
} screen_info_t;
extern screen_info_t screenInfo;
typedef struct _screenformat {
uint16_t width;
uint16_t height;
uint8_t bitsPerPixel;
uint16_t redMax;
uint16_t greenMax;
uint16_t blueMax;
uint8_t redShift;
uint8_t greenShift;
uint8_t blueShift;
uint32_t size;
uint32_t pad;
} screen_format_t;
extern screen_format_t screenFormat;
void initFrameBuffer(void);
void closeFrameBuffer(void);
int checkBufferStateChange(void);
uint32_t *readFrameBuffer(void);
#endif