Open mintisan opened 2 years ago
There are two (or 3) methods, you can use userspace direct register access by directly writing to memory like with a microcontroller OR write to /sys/class/gpio. You can also try to get wriring pi to work for the jetson, however thats a python library. It is much "safer" to access the GPIOs through the kernel (with sys/class/gpio) than using a userspace program with direct register access. This is due to there being no locking method (that I am aware of) to prevent another program from clobbering your register settings. Alternatively you can also write a kernel module and driver and then access the driver's public functions through your userspace program. Hope this helps!
Hi, very nice tutorial, but how can we access all-40 GPIO pins in kernel space?
Thanks.