len = snprintf(gpio_export, MAX_BUF_LEN, "%d", gpiopin);
status = write(fd, gpio_export, len);
- CHECK_ERROR(status != len);
-
close(fd);
+ CHECK_ERROR(status != len);
return 0;
}
len = snprintf(gpio_unexport, MAX_BUF_LEN, "%d", gpiopin);
status = write(fd, gpio_unexport, len);
- CHECK_ERROR(status != len);
-
close(fd);
+ CHECK_ERROR(status != len);
return 0;
}
len = snprintf(pwm_buf, MAX_BUF_LEN, "%d", pin);
status = write(fd, pwm_buf, len);
- CHECK_ERROR(status != len);
-
close(fd);
+ CHECK_ERROR(status != len);
return 0;
}
len = snprintf(pwm_buf, MAX_BUF_LEN, "%d", pin);
status = write(fd, pwm_buf, len);
- CHECK_ERROR(status != len);
-
close(fd);
+ CHECK_ERROR(status != len);
return 0;
}