...
Code Block | ||
---|---|---|
| ||
/* some device used for both input and output */ const char const *filename = "/dev/device2"; FILE *file = fopen(filename, "rb+"); if (file == NULL) { /* handle error */ } /* write to file stream */ /* read response from file stream */ fclose(file); |
...
Code Block | ||
---|---|---|
| ||
/* some device used for both input and output */ const char const *filename = "/dev/device2"; FILE *file = fopen(filename, "rb+"); if (file == NULL) { /* handle error */ ] /* write to file stream */ fflush(file); /* read response from file stream */ fclose(file); |
...