天嵌二次封装库使用手册
V2.1.2
首页
类
文件
文件列表
文件成员
lib_fbset.h
浏览该文件的文档.
1
7
#ifndef LINUX_LIBV2_SOURCE_FBSET_LIB_FBSET_H_
8
#define LINUX_LIBV2_SOURCE_FBSET_LIB_FBSET_H_
9
10
#include <stdint.h>
11
#include <unistd.h>
12
#include <stdio.h>
13
#include <stdlib.h>
14
#include <string.h>
15
#include <getopt.h>
16
#include <fcntl.h>
17
#include <sys/ioctl.h>
18
#include <linux/types.h>
19
#include <linux/fb.h>
20
21
/*
22
name: int lib_fbset(char *dev_name,struct lib_fbinfo* info)
23
function:
24
set Framebuffer arg 打开设备,临时设置fb设备的参数,并关闭设备
25
parameter:
26
1.char *dev_name 设备名称路径 "/dev/fb0"
27
2.struct lib_fbinfo* info 存放显示参数数据结构体
28
return:
29
-1 打开设备失败
30
-2 读取Framebuffer参数失败
31
-3: 设置Framebuffer参数失败
32
0 函数正常结束
33
};
34
*/
35
#ifdef __cplusplus
36
#define FBSET_API extern "C"
37
#else
38
#define FBSET_API
39
#endif
40
41
FBSET_API
struct
lib_fbinfo
42
{
43
__u32
xres
;
// visible resolution
44
__u32
yres
;
45
__u32
pixclock
;
// pixel clock in ps (pico seconds)
46
__u32
left_margin
;
// time from sync to picture
47
__u32
right_margin
;
// time from picture to sync
48
__u32
upper_margin
;
// time from sync to picture
49
__u32
lower_margin
;
50
__u32
hsync_len
;
// length of horizontal sync
51
__u32
vsync_len
;
//length of vertical sync
52
char
*
data_bit
;
//rg: RGB888 RGB666 RGB565
53
};
54
55
FBSET_API
int
lib_fbset
(
char
*dev_name,
struct
lib_fbinfo
*info);
56
57
#endif
lib_fbinfo::yres
__u32 yres
Definition:
lib_fbset.h:44
lib_fbinfo::right_margin
__u32 right_margin
Definition:
lib_fbset.h:47
lib_fbinfo::lower_margin
__u32 lower_margin
Definition:
lib_fbset.h:49
lib_fbinfo::upper_margin
__u32 upper_margin
Definition:
lib_fbset.h:48
lib_fbinfo::hsync_len
__u32 hsync_len
Definition:
lib_fbset.h:50
lib_fbset
FBSET_API int lib_fbset(char *dev_name, struct lib_fbinfo *info)
lib_fbinfo::vsync_len
__u32 vsync_len
Definition:
lib_fbset.h:51
lib_fbinfo::left_margin
__u32 left_margin
Definition:
lib_fbset.h:46
FBSET_API
#define FBSET_API
Definition:
lib_fbset.h:38
lib_fbinfo
Definition:
lib_fbset.h:41
lib_fbinfo::xres
__u32 xres
Definition:
lib_fbset.h:43
lib_fbinfo::pixclock
__u32 pixclock
Definition:
lib_fbset.h:45
lib_fbinfo::data_bit
char * data_bit
Definition:
lib_fbset.h:52
tqinclude
fbset
lib_fbset.h
制作者
1.8.11