Forum Discussion
Altera_Forum
Honored Contributor
21 years agochar driver
Is it not possible to have two successive writes/reads for a device opened in "r+" mode without closing and reopening the device? I have written char driver for this device which has a number of regi...
Altera_Forum
Honored Contributor
21 years ago$ man fopen:
The fopen function opens the file whose name is the string pointed to by path and associates a stream with it. For device files, you need to use:int handle = open(/dev/mtd/5, O_RDWR);
/* ... */
close(handle);