|
|
@ -30,12 +30,7 @@ int main(int argc, char **argv)
|
|
|
|
fprintf(stdout, "fail to open /dev/gpio");
|
|
|
|
fprintf(stdout, "fail to open /dev/gpio");
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (ioctl(fd_gpio, 1, NULL) != 0) {
|
|
|
|
if (ioctl(fd_gpio, 40, NULL) != 0) {
|
|
|
|
fprintf(stdout, "fail to use ioctl on /dev/gpio");
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
write(fd_gpio, "1", 1);
|
|
|
|
|
|
|
|
if (ioctl(fd_gpio, 2, NULL) != 0) {
|
|
|
|
|
|
|
|
fprintf(stdout, "fail to use ioctl on /dev/gpio");
|
|
|
|
fprintf(stdout, "fail to use ioctl on /dev/gpio");
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|