Forums » Software Development »
Test application for drivers
Added by Raja Vankam over 12 years ago
Hi,
Do you have any test application to test the drivers such as GPIO and UART? Could you please share them?
Regards,
Raja.
Replies (1)
RE: Test application for drivers - Added by Michael Williamson over 12 years ago
For a linux system, GPIOs can be driven using sysfs via command line to modify the pins via the gpiolib if the kernel has configured the pinmux settings for them to be associated to the GPIO function. For example, set the pin associated with GPIO bank 1, offset 5, as an output driving high, the GPIO number is (16xbank+offset)=21 and the commands would look like:
echo "21" > /sys/class/gpio/export echo "out" > /sys/class/gpioN/direction echo "1" > /sys/class/gpioN/value
The UART should appear as /dev/ttyS[0-N]. You should be able to open them using a program such as minicom, etc.
-Mike