📄 app.c
字号:
#include <stdio.h>#include <stdlib.h>#include <errno.h>#include <sys/time.h>#include <sys/types.h>#include <fcntl.h>#include <unistd.h>#include <sys/ioctl.h>#include <linux/ioctl.h>#include "pciioctl.h"#define BUFSIZE 70#define IOCSTART _IO(int main(int argc,char *argv[]){ int fd; int choose,ready; int msg=10; int Finish=30; int Finish1; int ch,letdo,checkall,a,b,c,save; char mode; int check=1; letdo=1; c=0;while(letdo){ ready=1; if(check) { check=0; /* Open PCI_IK device */ if ((fd = open("/dev/PCI_IK", O_WRONLY))<0) { fprintf(stderr, "Error opening /dev/rtf0\n"); exit(1); } } fprintf(stderr,"set the work mode \n"); scanf("%c",&mode); fprintf(stderr,"mode=%c",mode); switch(mode) { case 'r': msg=ioctl(fd,IK_IOCSTART,NULL); break; case 's': msg=ioctl(fd,IK_IOCSTOP,NULL); break; case 'e': msg=ioctl(fd,IK_IOCENCODE,1); default: break; } fprintf(stderr,"msg=%d",msg); } close(fd); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -