I had to reach GPIO pins to make AT91SAM9263 board useful, but it is not easy in Linux, because all hardware is controlled by kernel and commands from userspace can’t affect hardware, that’s why I had to write my own kernel module for GPIO control. The loaded module creates a misc device in /dev called gpio for PB8 pin control. The port can be controlled using echo. For example, echo 1 > /dev/gpio will set gpio pin PB8 to be high (5V output). The current version of the module is used for setting pin high or low. Here is the code: Atmel ARM9 Linux GPIO.
Controlling GPIO pins in Linux
- No comments yet.