Using the functions listed above it is easy to implement the loopback example given earlier: #include <stdio.h> #include <stdlib.h> #include <time.h> #include "Gpio5.h" int main(int argc, char **argv) ...
Putting all of this together gives us the complete program: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <sys/ioctl.h> #include <linux/spi ...