28 #define GPIOHANDLE_REQUEST_INPUT (1UL << 0) 29 #define GPIOHANDLE_REQUEST_OUTPUT (1UL << 1) 30 #define GPIOHANDLE_REQUEST_ACTIVE_LOW (1UL << 2) 31 #define GPIOHANDLE_REQUEST_OPEN_DRAIN (1UL << 3) 32 #define GPIOHANDLE_REQUEST_OPEN_SOURCE (1UL << 4) 91 #define GPIOEVENT_REQUEST_RISING_EDGE (1UL << 0) 92 #define GPIOEVENT_REQUEST_FALLING_EDGE (1UL << 1) 93 #define GPIOEVENT_REQUEST_BOTH_EDGES ((1UL << 0) | (1UL << 1)) 116 #define RC_GPIOEVENT_ERROR -1 117 #define RC_GPIOEVENT_TIMEOUT 0 118 #define RC_GPIOEVENT_RISING_EDGE 1 119 #define RC_GPIOEVENT_FALLING_EDGE 2 139 int rc_gpio_poll(
int chip,
int pin,
int timeout_ms, uint64_t* event_time_ns);
int rc_gpio_init(int chip, int pin, int handle_flags)
Configures a gpio pin as input or output.
int rc_gpio_init_event(int chip, int pin, int handle_flags, int event_flags)
Initializes a pin for interrupt event polling and normal reading.
int rc_gpio_set_value(int chip, int pin, int value)
Sets the value of a GPIO pin when in output mode.
void rc_gpio_cleanup(int chip, int pin)
closes the file descriptor for a pin
int rc_gpio_get_value(int chip, int pin)
Reads the value of a GPIO pin when in input mode or output mode.
int rc_gpio_poll(int chip, int pin, int timeout_ms, uint64_t *event_time_ns)
polls a pin when configured for interrupt event polling