How to use GPIO?


I want to do follow, but I don’t have any reference. Where can I get some sdk/docments/samples?

thank you!

  1. Trigger camera take picture using GPIO?
  2. Change the trigger frequency?

hello afhel,

there’s no samples to monitor GPIO interrupt for taking a snapshot from video streaming.
however, you may access [L4T Multimedia API Reference] and check 09_camera_jpeg_capture for an example of image captures.

in addition,
you may also refer to generic kernel APIs to trigger GPIOs,
for example,


static inline int gpio_get_value(unsigned int gpio)
  	return __gpio_get_value(gpio);

static inline void gpio_set_value(unsigned int gpio, int value)
  	__gpio_set_value(gpio, value);

I am struggling with this same issue. I am very new to Linux and the world is quite confusing after using only microprocessors…

When I write C-code, how do I use the gpio_get_value and _set_value? Can I just include gpio.h and the compiler will find it?

Or are there some good GPIO libraries available?

Hi dan.

You can dowload this program.