forked from koreader/koreader-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
linux_fb_h.lua
65 lines (64 loc) · 1.64 KB
/
linux_fb_h.lua
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
57
58
59
60
61
62
63
64
65
local ffi = require("ffi")
ffi.cdef[[
static const int FBIOGET_FSCREENINFO = 17922;
static const int FBIOGET_VSCREENINFO = 17920;
static const int FBIOPUT_VSCREENINFO = 17921;
static const int FB_TYPE_PACKED_PIXELS = 0;
static const int FB_ROTATE_UR = 0;
static const int FB_ROTATE_CW = 1;
static const int FB_ROTATE_UD = 2;
static const int FB_ROTATE_CCW = 3;
struct fb_bitfield {
unsigned int offset;
unsigned int length;
unsigned int msb_right;
};
struct fb_fix_screeninfo {
char id[16];
long unsigned int smem_start;
unsigned int smem_len;
unsigned int type;
unsigned int type_aux;
unsigned int visual;
short unsigned int xpanstep;
short unsigned int ypanstep;
short unsigned int ywrapstep;
unsigned int line_length;
long unsigned int mmio_start;
unsigned int mmio_len;
unsigned int accel;
short unsigned int capabilities;
short unsigned int reserved[2];
};
struct fb_var_screeninfo {
unsigned int xres;
unsigned int yres;
unsigned int xres_virtual;
unsigned int yres_virtual;
unsigned int xoffset;
unsigned int yoffset;
unsigned int bits_per_pixel;
unsigned int grayscale;
struct fb_bitfield red;
struct fb_bitfield green;
struct fb_bitfield blue;
struct fb_bitfield transp;
unsigned int nonstd;
unsigned int activate;
unsigned int height;
unsigned int width;
unsigned int accel_flags;
unsigned int pixclock;
unsigned int left_margin;
unsigned int right_margin;
unsigned int upper_margin;
unsigned int lower_margin;
unsigned int hsync_len;
unsigned int vsync_len;
unsigned int sync;
unsigned int vmode;
unsigned int rotate;
unsigned int colorspace;
unsigned int reserved[4];
};
]]