Since the GPIO can be as input, I have written a kernel module, which shows the status of the input. If the input is high, output of the device file will be 1 and 0 otherwise. Loaded module creates a misc device in /dev directory called gpiopb21, so if you read this file using cat, the output will be 1 or 0. As you can see, this software is used for PB21 pin reading. Source code can be found here.
Reading GPIO input in Linux
- No comments yet.