This is the latest (main) BeagleBoard documentation. If you are looking for stable releases, use the drop-down menu on the bottom-left and select the desired version.

Function rc_gpio_get_value

Function Documentation

int rc_gpio_get_value(int chip, int pin)

Reads the value of a GPIO pin when in input mode or output mode.

Must call rc_gpio_init first.

  • chip[in] The chip number, /dev/gpiochipX

  • pin[in] The pin ID


1 if pin is high, 0 if pin is low, -1 on error