Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fcntl.h>
- #include <unistd.h>
- #include <stdlib.h>
- #include <stdio.h>
- int main()
- {
- int fd = open( "/sys/class/gpio/gpio20/value", O_RDWR | O_CLOEXEC );
- if( fd < 0 ) {
- fprintf( stderr, "open: %m\n" );
- exit(1);
- }
- char c = '0';
- write( fd, &c, 1 );
- close( fd );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement