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