I am using C++ and mmap to access GPIO. Following is the code I am using.
--gpio.h
--
#include stdio.h
#include stdlib.h
#include sys/types.h
#include sys/stat.h
#include unistd.h
#include fcntl.h
#include
Sorry the first file's name should be gpio.cpp.
The code I have posted is based on the code at the following link:
https://github.com/majestik666/Beagle_GPIO/blob/master/Beagle_GPIO.cc.
I have attached my files(gpio.cpp and gpio.h) and hope it could help you.
One thing I want to
Pad control registers can only be changed in kernel space. You could write a
kernel driver or do it the right way and use device tree.
See
https://github.com/nomel/beaglebone/tree/master/gpio-header
If you don't want to use it directly, you can use the generated files as an
example.
--
For
Hi,
Thanks!
it was said there to change the Pad Control Register,
However, it didn't see how one changes this Register.
How is it accessed please?
Thank you.
On Wednesday, February 12, 2014 2:14:38 PM UTC+2, matt wrote:
Hi,
I got a BBB.
I connected a LED to its GPIO1_16 pin, which I