13
May

Yet Another Quick Serial Read c Program

Here’s yet another quick example of a serial capture c program that I came across while at work the other day. I just figured I would share…

int main(int argc, char * argv[]){
while(1){
FILE *fp;

fp = fopen("/proc/bus/usb/001/003", "r");

char buff[100];
while(fscanf(fp, "%s", buff) != EOF){
printf("%sn", buff);
}
fclose(fp);
}
return 0;
}

Feel free to donate if this post prevented any headaches! Another way to show your appreciation is to take a gander at these relative ads that you may be interested in:


There's 0 Comment So Far

Share your thoughts, leave a comment!