fd = open(MYADC,O_RDWR,0666);
if (fd < 0)
{
perror("open device adc_driver error\n");
exit(1);
}
printf("open /dev/adc_driver success!\n");
while(1)
{
read(fd,&value,4);
printf("result value=%d\n",value);
Delay_MS(1000);
}
if(close(fd)<0)
{
perror("close error\n");
exit(1);
}
return 0;
}