天嵌二次封装库使用手册  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 
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
__u32 yres
Definition: lib_fbset.h:44
__u32 right_margin
Definition: lib_fbset.h:47
__u32 lower_margin
Definition: lib_fbset.h:49
__u32 upper_margin
Definition: lib_fbset.h:48
__u32 hsync_len
Definition: lib_fbset.h:50
FBSET_API int lib_fbset(char *dev_name, struct lib_fbinfo *info)
__u32 vsync_len
Definition: lib_fbset.h:51
__u32 left_margin
Definition: lib_fbset.h:46
#define FBSET_API
Definition: lib_fbset.h:38
__u32 xres
Definition: lib_fbset.h:43
__u32 pixclock
Definition: lib_fbset.h:45
char * data_bit
Definition: lib_fbset.h:52