LCD设备驱动程序

对屏幕进行抓屏 cp /dev/fb0 myfile.png

帧缓冲设备的主设备号29,次设备号0-31,也就是dev/fb0 -dev/fb31

填充一个fbinfo结构。用register_framebuffer(fbinfo*)将fbinfo结构注冊到内核,对于fbinfo结构,最基本的是fs_ops成员,须要针对详细设备实现fs_ops中的接口。


在linux/include/fb.h中,定义了基本的数据结构

定义显卡信息:

struct fb_fix_screeninfo  :

unsigned long smem_start; /* Start of frame buffer mem */
/* (physical address) */
__u32 smem_len; /* Length of frame buffer mem */

unsigned long mmio_start; /* Start of Memory Mapped I/O   */
/* (physical address) */
__u32 mmio_len; /* Length of Memory Mapped I/O  */


struct fb_var_screeninfo 

struct fb_cmap

struct fb_info



posted @ 2017-07-22 16:32  claireyuancy  阅读(193)  评论(0)    收藏  举报