請問各位大大, 我的QT2440在開機時, LCD沒有出現任何開機訊息, 但是外接uart就會出現在終端機上! kernel 是2.4.18, 不知是那裡需要設定 ? or .... ?
謝謝
版主: chester
前文中您曾提及到"讓 LCD 能具有 console 能力", 請問這方面應該在那改設定值 ? 因為我打算一步一步的做
Device Drivers -->
Graphics support -->
Console display driver support -->
[*] Framebuffer Console support (把這個勾起來)
struct fb_var_screeninfo vinfo;
struct fb_fix_screeninfo finfo;
__u8 *fb_buf;
__u32 screensize;
int fbfd = open("/dev/fb0", O_RDWR);
if(fbfd<0) {
printf("Error: cannot open framebuffer device.\n");
return -1;
}
// Get fixed screen information
if (ioctl(fbfd, FBIOGET_FSCREENINFO, &finfo)) {
printf("Error reading fixed information.\n");
close(fbfd);
return -1;
}
// Get variable screen information
if (ioctl(fbfd, FBIOGET_VSCREENINFO, &vinfo)) {
printf("Error reading variable information.\n");
close(fbfd);
return -1;
}
printf("%dx%d, %dbpp\n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel );
fb_xres = vinfo.xres;
fb_yres = vinfo.yres;
fb_bpp = vinfo.bits_per_pixel;
screensize = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel / 8;
fb_buf = (char *)mmap(0, screensize, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0);
if ((int)fb_buf == -1) {
printf("Error: failed to map framebuffer device to memory.\n");
close(fbfd);
return -1;
}
正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客