|
发表于 2013-12-12 09:50:01
|
显示全部楼层
lin 发表于 2013-12-11 21:06 
你可以看看这个
http://forum.cubietech.com/forum.php?mod=viewthread&tid=1712&extra=
多谢你的回复,回头我也试试看。
昨天晚上试了直接从底层设置LCD,发现必须开机连接HDMI才能起到效果,否则就没用。
我再试试你的方法,回头再再请教。
//Open Display Device
if(disp_fd == 0) {
disp_fd = open("/dev/disp", O_RDWR, 0);
if (disp_fd < 0) {
disp_fd = 0;
return (*env)->NewStringUTF(env, "Open display device failed!");;
}
}
//Change Display Output to LCD
args[0] = 0;//we set displayno=0 as screen 0 output
args[1] = 0;
args[2] = 0;
args[3] = 0;
ret = ioctl(disp_fd,DISP_CMD_HDMI_OFF,(unsigned long)args);
//ret = ioctl(disp_fd,DISP_CMD_LCD_OFF,(unsigned long)args);
ret = ioctl(disp_fd,DISP_CMD_LCD_ON,(unsigned long)args);
//ret = ioctl(disp_fd,DISP_CMD_HDMI_ON,(unsigned long)args);
close(disp_fd);
|
|