📄 testdriverapp.c
字号:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
main()
{
int fd,i,j;
char buf[10];
fd=open("/dev/test",O_RDWR);
if(fd<0)
{
printf("can not open file\n");
exit(0);
}
ioctl(fd, 1, 0); //µÚ2 žö²ÎÊý1 ±íÊŸÀ®°ÈœÐ,0 ±íÊŸ²»œÐ
close(fd);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -