Function rc_gpio_set_value#

Function Documentation#

int rc_gpio_set_value(int chip, int pin, int value)#

Sets the value of a GPIO pin when in output mode.

must call rc_gpio_init with the OUTPUT flag first.

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

  • pin[in] The pin ID

  • value[in] 0 for off (inactive), nonzero for on (active)

Returns:

0 on success or -1 on failure