src/gpio.c
/**
 * @breif Set GPIO edge trigger
 *
 * Set the given GPIO pin to change value based on the rising or falling edge
 *
 * @param gpio GPIO pin number
 * @param edge Edge value RISING, FALLING, BOTH, or NONE
 *
 * @return 0 on success, or -1 on failure and errno is set
 */
@breif Set GPIO edge trigger
Set the given GPIO pin to change value based on the rising or falling edge



@return 0 on success, or -1 on failure and errno is set
@breif Set GPIO edge trigger Set the given GPIO pin to change value based on the rising or falling edge @return 0 on success or - 1 on failure and errno is set
int gpio_set_edge(unsigned int gpio, char* edge) {
	int fd = gpio_fd_open(gpio, SYSFS_GPIO_EDGE, O_WRONLY);
	if (fd < 0) {
		return fd;
	}
	write(fd, edge, strlen(edge) + 1);
	close(fd);
	return 0;
}
int gpio_set_edge ( unsigned int gpio , char * edge ) { int fd = gpio_fd_open ( gpio , SYSFS_GPIO_EDGE , O_WRONLY ) ; if ( fd < 0 ) { return fd ; } write ( fd , edge , strlen ( edge ) + 1 ) ; close ( fd ) ; return 0 ; }
@breif Set GPIO edge trigger
 Set the given GPIO pin to change value based on the rising or falling edge
@breif Set GPIO edge trigger Set the given GPIO pin to change value based on the rising or falling edge