Function rc_gpio_get_value#
Defined in File gpio.h
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.
- Parameters:
chip – [in] The chip number, /dev/gpiochipX
pin – [in] The pin ID
- Returns:
1 if pin is high, 0 if pin is low, -1 on error