📄 test.c~
字号:
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
main()
{
int testdev;
int i;
int buf[10]={1,2,3,4,5,6,7,8,9,0};
testdev = open("/dev/HPI",O_RDWR);
if ( testdev == -1 )
{
printf("Cann't open file ");
exit(0);
}
if(write(testdev,buf,10)) printf("write ok\n");
close(testdev);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -