videoshift.c
来自「videoshift.rar—HHARM9200.rar 华恒AT91rm920」· C语言 代码 · 共 33 行
C
33 行
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#define LCD 0#define VGA 1#define VIDEOSHIFT 0X6666int main(int argc, char *argv[]){ int fd; int shift =LCD; if(argc>1) { if(strcmp(argv[1],"0")==0) shift = LCD; else if(strcmp(argv[1],"1")==0) shift = VGA; else printf("false parameter\n"); } if((fd = open("/dev/fb0",O_RDWR))<0) printf("Cannot open fb device!\n"); ioctl(fd,VIDEOSHIFT,shift); close(fd); return 0; }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?