VSF Documented
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
source
shell
sys
linux
include
linux
fb.h
Go to the documentation of this file.
1
#ifndef __VSF_LINUX_FB_H__
2
#define __VSF_LINUX_FB_H__
3
4
#include <
linux/types.h
>
5
#include <
stdint.h
>
6
7
#ifdef __cplusplus
8
extern
"C"
{
9
#endif
10
11
// for ioctrl
12
#define FBIOGET_VSCREENINFO (('F' << 8) | 0)
13
#define FBIOPUT_VSCREENINFO (('F' << 8) | 1)
14
#define FBIOGET_FSCREENINFO (('F' << 8) | 2)
15
#define FBIOGETCMAP (('F' << 8) | 4)
16
#define FBIOPUTCMAP (('F' << 8) | 5)
17
#define FBIOPAN_DISPLAY (('F' << 8) | 6)
18
#define FBIOBLANK (('F' << 8) | 17)
19
#define FBIO_WAITFORVSYNC (('F' << 8) | 32)
20
21
// supported only by VSF for displays without framebuffer,
22
// take an argument as pointer to vk_disp_area_t.
23
// Usage:
24
// No need to mmap the frame buffer, just set the area to update,
25
// and then write the buffer of the area.
26
#define FBIOSET_AREA (('F' << 8) | 64)
27
28
#define FB_NONSTD_HAM 1
29
#define FB_NONSTD_REV_PIX_IN_B 2
30
31
#define FB_ACTIVATE_NOW 0
32
#define FB_ACTIVATE_NXTOPEN 1
33
#define FB_ACTIVATE_TEST 2
34
#define FB_ACTIVATE_MASK 15
35
#define FB_ACTIVATE_VBL 16
36
#define FB_CHANGE_CMAP_VBL 32
37
#define FB_ACTIVATE_ALL 64
38
#define FB_ACTIVATE_FORCE 128
39
#define FB_ACTIVATE_INV_MODE 256
40
#define FB_ACTIVATE_KD_TEXT 512
41
42
#define FB_VISUAL_MONO01 0
43
#define FB_VISUAL_MONO10 1
44
#define FB_VISUAL_TRUECOLOR 2
45
#define FB_VISUAL_PSEUDOCOLOR 3
46
#define FB_VISUAL_DIRECTCOLOR 4
47
#define FB_VISUAL_STATIC_PSEUDOCOLOR 5
48
#define FB_VISUAL_FOURCC 6
49
50
#define FB_TYPE_PACKED_PIXELS 0
51
#define FB_TYPE_PLANES 1
52
#define FB_TYPE_INTERLEAVED_PLANES 2
53
#define FB_TYPE_TEXT 3
54
#define FB_TYPE_VGA_PLANES 4
55
#define FB_TYPE_FOURCC 5
56
57
#define FB_SYNC_HOR_HIGH_ACT 1
58
#define FB_SYNC_VERT_HIGH_ACT 2
59
#define FB_SYNC_EXT 4
60
#define FB_SYNC_COMP_HIGH_ACT 8
61
#define FB_SYNC_BROADCAST 16
62
#define FB_SYNC_ON_GREEN 32
63
64
#define FB_VMODE_NONINTERLACED 0
65
#define FB_VMODE_INTERLACED 1
66
#define FB_VMODE_DOUBLE 2
67
#define FB_VMODE_ODD_FLD_FIRST 4
68
#define FB_VMODE_MASK 255
69
70
#define FB_VMODE_YWRAP 256
71
#define FB_VMODE_SMOOTH_XPAN 512
72
#define FB_VMODE_CONUPDATE 512
73
74
#define FB_ROTATE_UR 0
75
#define FB_ROTATE_CW 1
76
#define FB_ROTATE_UD 2
77
#define FB_ROTATE_CCW 3
78
79
#define VESA_NO_BLANKING 0
80
#define VESA_VSYNC_SUSPEND 1
81
#define VESA_HSYNC_SUSPEND 2
82
#define VESA_POWERDOWN 3
83
84
#define PICOS2KHZ(a) (1000000000UL / (a))
85
#define KHZ2PICOS(a) (1000000000UL / (a))
86
87
struct
fb_fix_screeninfo
{
88
char
id
[16];
89
90
uintptr_t
smem_start
;
91
__u32
smem_len
;
92
__u32
line_length
;
93
__u32
type
;
94
__u32
visual
;
95
};
96
97
struct
fb_bitfield
{
98
__u32
offset
;
99
__u32
length
;
100
__u32
msb_right
;
101
};
102
103
struct
fb_var_screeninfo
{
104
__u32
xres
;
105
__u32
yres
;
106
__u32
xres_virtual
;
107
__u32
yres_virtual
;
108
__u32
xoffset
;
109
__u32
yoffset
;
110
111
__u32
bits_per_pixel
;
112
__u32
grayscale
;
113
struct
fb_bitfield
red
;
114
struct
fb_bitfield
green
;
115
struct
fb_bitfield
blue
;
116
struct
fb_bitfield
transp
;
117
118
__u32
nonstd
;
119
__u32
activate
;
120
__u32
height
;
121
__u32
width
;
122
__u32
fps
;
123
124
// timing
125
__u32
pixclock
;
126
__u32
left_margin
;
127
__u32
right_margin
;
128
__u32
upper_margin
;
129
__u32
lower_margin
;
130
__u32
hsync_len
;
131
__u32
vsync_len
;
132
__u32
sync
;
133
__u32
vmode
;
134
__u32
rotate
;
135
__u32
colorspace
;
136
};
137
138
struct
fb_cmap
{
139
__u32
start
;
140
__u32
len
;
141
__u16
*
red
;
142
__u16
*
green
;
143
__u16
*
blue
;
144
__u16
*
transp
;
145
};
146
147
#ifdef __cplusplus
148
}
149
#endif
150
151
#endif
types.h
__u32
uint32_t __u32
Definition
types.h:55
__u16
uint16_t __u16
Definition
types.h:53
stdint.h
uintptr_t
uint32_t uintptr_t
Definition
stdint.h:38
fb_bitfield
Definition
fb.h:97
fb_bitfield::offset
__u32 offset
Definition
fb.h:98
fb_bitfield::msb_right
__u32 msb_right
Definition
fb.h:100
fb_bitfield::length
__u32 length
Definition
fb.h:99
fb_cmap
Definition
fb.h:138
fb_cmap::transp
__u16 * transp
Definition
fb.h:144
fb_cmap::green
__u16 * green
Definition
fb.h:142
fb_cmap::start
__u32 start
Definition
fb.h:139
fb_cmap::len
__u32 len
Definition
fb.h:140
fb_cmap::blue
__u16 * blue
Definition
fb.h:143
fb_cmap::red
__u16 * red
Definition
fb.h:141
fb_fix_screeninfo
Definition
fb.h:87
fb_fix_screeninfo::type
__u32 type
Definition
fb.h:93
fb_fix_screeninfo::smem_start
uintptr_t smem_start
Definition
fb.h:90
fb_fix_screeninfo::visual
__u32 visual
Definition
fb.h:94
fb_fix_screeninfo::smem_len
__u32 smem_len
Definition
fb.h:91
fb_fix_screeninfo::line_length
__u32 line_length
Definition
fb.h:92
fb_var_screeninfo
Definition
fb.h:103
fb_var_screeninfo::lower_margin
__u32 lower_margin
Definition
fb.h:129
fb_var_screeninfo::upper_margin
__u32 upper_margin
Definition
fb.h:128
fb_var_screeninfo::hsync_len
__u32 hsync_len
Definition
fb.h:130
fb_var_screeninfo::colorspace
__u32 colorspace
Definition
fb.h:135
fb_var_screeninfo::blue
struct fb_bitfield blue
Definition
fb.h:115
fb_var_screeninfo::vsync_len
__u32 vsync_len
Definition
fb.h:131
fb_var_screeninfo::pixclock
__u32 pixclock
Definition
fb.h:125
fb_var_screeninfo::sync
__u32 sync
Definition
fb.h:132
fb_var_screeninfo::red
struct fb_bitfield red
Definition
fb.h:113
fb_var_screeninfo::transp
struct fb_bitfield transp
Definition
fb.h:116
fb_var_screeninfo::xres
__u32 xres
Definition
fb.h:104
fb_var_screeninfo::nonstd
__u32 nonstd
Definition
fb.h:118
fb_var_screeninfo::vmode
__u32 vmode
Definition
fb.h:133
fb_var_screeninfo::width
__u32 width
Definition
fb.h:121
fb_var_screeninfo::yoffset
__u32 yoffset
Definition
fb.h:109
fb_var_screeninfo::right_margin
__u32 right_margin
Definition
fb.h:127
fb_var_screeninfo::left_margin
__u32 left_margin
Definition
fb.h:126
fb_var_screeninfo::yres
__u32 yres
Definition
fb.h:105
fb_var_screeninfo::green
struct fb_bitfield green
Definition
fb.h:114
fb_var_screeninfo::xres_virtual
__u32 xres_virtual
Definition
fb.h:106
fb_var_screeninfo::activate
__u32 activate
Definition
fb.h:119
fb_var_screeninfo::fps
__u32 fps
Definition
fb.h:122
fb_var_screeninfo::yres_virtual
__u32 yres_virtual
Definition
fb.h:107
fb_var_screeninfo::xoffset
__u32 xoffset
Definition
fb.h:108
fb_var_screeninfo::rotate
__u32 rotate
Definition
fb.h:134
fb_var_screeninfo::grayscale
__u32 grayscale
Definition
fb.h:112
fb_var_screeninfo::height
__u32 height
Definition
fb.h:120
fb_var_screeninfo::bits_per_pixel
__u32 bits_per_pixel
Definition
fb.h:111
Generated by
1.9.8