fb问题咨询
在linux内核源代码中
.width= 320,
.height= 240,
.pixclock= 80000, /* HCLK 100 MHz, divisor 3 */
.setclkval= 0x3,
.xres= 320,
.yres= 240,
其中width 和xres是一样的
height 和yres的值也是一样的
width 和xres分别是什么意思?
呵呵,说实话,你这里的width和xres可能并没有多大的区别,如此命名可能只是为了方便理解而已。
关于谁代表虚拟屏尺寸,谁又代表实际屏的尺寸这个是由初始化显示控制串的那段代码决定的!
如果你硬要区分可以引用一些较规范的、容易获取的、稳定的结构体,如linux kernel里的include/linux/fb.h
struct fb_var_screeninfo {
__u32 xres;/* visible resolution实屏*/
__u32 yres;
__u32 xres_virtual;/* virtual resolution虚拟屏*/
__u32 yres_virtual;
/* 实屏在虚拟屏中的位置参数 */
__u32 xoffset;/* offset from virtual to visible */
__u32 yoffset;/* resolution*/
__u32 bits_per_pixel;/* guess what*/
__u32 grayscale;/* 0 = color, 1 = grayscale,*/
/* >1 = FOURCC*/
struct fb_bitfield red;/* bitfield in fb mem if true color, */
struct fb_bitfield green;/* else only length is significant */
struct fb_bitfield blue;
struct fb_bitfield transp;/* transparency*/
__u32 nonstd;/* != 0 Non standard pixel format */
__u32 activate;/* see FB_ACTIVATE_**/
__u32 height;/* height of picture in mm */
__u32 width;/* width of picture in mm */
__u32 accel_flags;/* (OBSOLETE) see fb_info.flags */
/* Timing: All values in pixclocks, except pixclock (of course) */
__u32 pixclock;/* pixel clock in ps (pico seconds) */
__u32 left_margin;/* time from sync to picture*/
__u32 right_margin;/* time from picture to sync*/
__u32 upper_margin;/* time from sync to picture*/
__u32 lower_margin;
__u32 hsync_len;/* length of horizontal sync*/
__u32 vsync_len;/* length of vertical sync*/
__u32 sync;/* see FB_SYNC_**/
__u32 vmode;/* see FB_VMODE_**/
__u32 rotate;/* angle we rotate counter clockwise */
__u32 colorspace;/* colorspace for FOURCC-based modes */
__u32 reserved[4];/* Reserved for future compatibility */
};