⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test2.c

📁 s3c2410
💻 C
字号:
#include <stdio.h> 
#include <stdlib.h> 
#include <unistd.h> 
#include <sys/ioctl.h> 
#include <fcntl.h>

int main(int argc, char **argv) 
{   
int fd;
int iRet=0; 
int i=0;
unsigned char buf[1]={0};

fd = open("/dev/iic", O_RDWR ); 
if (fd < 0) 
{ 
   perror("can not open device led"); 
   exit(1); 
} 

iRet=read(fd,buf,1); 
printf("buf is %d\n",buf[0]);
close(fd); 
return 0; 
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -