diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | bcm4751_gpsd.c | 6 | ||||
-rw-r--r-- | utils/Makefile | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a83ab1d --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +all: bcm4751_gpsd + +bcm4751_gpsd: meif.c bcm4751_gpsd.c + $(CC) -static -o $@ $^ +clean: + rm -f bcm4751_gpsd diff --git a/bcm4751_gpsd.c b/bcm4751_gpsd.c index d14667c..4b88295 100644 --- a/bcm4751_gpsd.c +++ b/bcm4751_gpsd.c @@ -24,6 +24,7 @@ #include <termios.h> #include <errno.h> +#include <asm-generic/ioctls.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -285,6 +286,11 @@ int main(void) int fd = -1; int rc = -1; + printf("Turning the GPS off...\n"); + rc = sec_gps_power(0); + if(rc < 0) { + printf("Warning: Failed to turn the GPS off!\n"); + } printf("Turning the GPS on...\n"); rc = sec_gps_power(1); if(rc < 0) { diff --git a/utils/Makefile b/utils/Makefile index eb48aed..108fbef 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -1,6 +1,6 @@ all: gps-test-crespo gps-test-crespo: bcm4751_test.c - $(CC) -o $@ $^ + $(CC) -static -o $@ $^ clean: rm -f gps-test-crespo |