In this recipe we'll see how to read and write data to and from a driver according to read() and write() system calls behaviors.
Exchanging data with a char driver
Getting ready
To modify our first char driver in order to allow it to exchange data between user space we can still work on the module used in the previous recipe.
How to do it...
In order to exchange data with our new driver, we need to modify the read() and write() methods according to what we said earlier, and we have to add a data buffer where exchanged data can be stored:
- So, let's modify our...