Hi Mates,
I have board which has digital in and digital out, Is there any support in linux (generic driver) which can be used to test digital i/o ? Or do I need to write a new driver for it ?
Thanks & Regards,
Mike
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Mike,
What processor are you using ?
You can use GPIO if you need digital input and output operations.
Hi Mike,
gpio_direction_output(30, 1);
gpio_set_value(30,0);
gpio_get_value(30);
gpio_set_value(30,1);
gpio_get_value(30);
You can use the above C API in linux kernel driver to change the particular GPIO value.
http://projects.qi-hardware.com/index.php/p/nn-usb-fpga/source/tree/6caf52eff7e3126efa3468d2f6bd5e6a8e9d2fd5/Examples/drivers/blink/blinker.c
You might get away w/o recompiling the kernel if sysfs with GPIO support is enabled. See
http://processors.wiki.ti.com/index.php/TI81XX_PSP_GPIO_Driver_User_Guide#User_Space_-_Sysfs_control
Also, make sure that the pin is set to GPIO. If debugfs is enabled, you can do:
mkdir /debug
mount -n -t debugfs none /debug
navigate to /debug/omap_mux
To see the mux value, cat the pin. For example: cat gpmc_clk
Make sure the mode is for GPIO