Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GNU nano 4.3 test.c
- #include "cm108.h"
- #include <stdio.h>
- #include <stdlib.h>
- /**
- * Very simple tool to test the cm108 ptt circuit.
- *
- * If it works, it should press the PTT button for
- * one second and then release it.
- */
- int main(int argc, char** argv) {
- const char *path;
- path = cm108_find_device();
- if(!path) {
- printf("No device found. Sorry.\n");
- return 1;
- }
- printf("Found device %s\n", path);
- int fd = cm108_open(path);
- if(fd == -1) {
- printf("\nCould not open device! Have you installed the udev rules?\n");
- printf("You can retry as root.\n");
- exit(3);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement