[prev in list] [next in list] [prev in thread] [next in thread]
List: gpsd-commit-watch
Subject: [Gpsd-commit-watch] r1857 - trunk
From: esr () sheep ! berlios ! de (Eric S ! Raymond at BerliOS)
Date: 2005-02-28 23:16:49
Message-ID: 200502282316.j1SNGngH012824 () sheep ! berlios ! de
[Download RAW message or body]
Author: esr
Date: 2005-03-01 00:16:45 +0100 (Tue, 01 Mar 2005)
New Revision: 1857
Removed:
trunk/sirf.h
Modified:
trunk/Makefile.am
trunk/libgpsd_core.c
trunk/sirf.c
Log:
SiRF functions are no longer exported (because there's a driver now) so
we can get rid of the header.
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2005-02-28 22:43:52 UTC (rev 1856)
+++ trunk/Makefile.am 2005-02-28 23:16:45 UTC (rev 1857)
@@ -102,7 +102,7 @@
BZIP2=$(BZIP2_ENV) $(AMTAR)$(TAR) --bzip2 -chof $(distdir).tar.bz2 $(distdir)
-rm -rf $(distdir)
-include_HEADERS = gps.h gpsd.h sirf.h
+include_HEADERS = gps.h gpsd.h
# Automake is buggy and doesn't automatically include bin_SCRIPTS in dist
EXTRA_DIST = \
Modified: trunk/libgpsd_core.c
===================================================================
--- trunk/libgpsd_core.c 2005-02-28 22:43:52 UTC (rev 1856)
+++ trunk/libgpsd_core.c 2005-02-28 23:16:45 UTC (rev 1857)
@@ -14,7 +14,6 @@
#endif
#include "gpsd.h"
-#include "sirf.h"
#define NO_MAG_VAR -999 /* must be out of band for degrees */
Modified: trunk/sirf.c
===================================================================
--- trunk/sirf.c 2005-02-28 22:43:52 UTC (rev 1856)
+++ trunk/sirf.c 2005-02-28 23:16:45 UTC (rev 1857)
@@ -17,7 +17,6 @@
#include <stdio.h>
#include "gpsd.h"
-#include "sirf.h"
#define HI(n) ((n) >> 8)
#define LO(n) ((n) & 0xff)
@@ -41,8 +40,26 @@
return(crc);
}
+static int sirf_speed(int ttyfd, int speed)
+/* change speed in binary mode */
+{
+ u_int8_t msg[] = {0xa0, 0xa2, 0x00, 0x09,
+ 0x86,
+ 0x0, 0x0, 0x12, 0xc0, /* 4800 bps */
+ 0x08, /* 8 data bits */
+ 0x01, /* 1 stop bit */
+ 0x00, /* no parity */
+ 0x01, /* reserved */
+ 0x00, 0x00, 0xb0, 0xb3};
-int sirf_to_nmea(int ttyfd, int speed)
+ msg[8] = HI(speed);
+ msg[9] = LO(speed);
+ crc_sirf(msg);
+ return (write(ttyfd, msg, 9+8) != 9+8);
+}
+
+#ifdef __UNUSED__
+static int sirf_to_nmea(int ttyfd, int speed)
/* switch from binary to NMEA at specified baud */
{
u_int8_t msg[] = {0xa0, 0xa2, 0x00, 0x18,
@@ -64,27 +81,7 @@
return (write(ttyfd, msg, 0x18+8) != 0x18+8);
}
-
-int sirf_speed(int ttyfd, int speed)
-/* change speed in binary mode */
-{
- u_int8_t msg[] = {0xa0, 0xa2, 0x00, 0x09,
- 0x86,
- 0x0, 0x0, 0x12, 0xc0, /* 4800 bps */
- 0x08, /* 8 data bits */
- 0x01, /* 1 stop bit */
- 0x00, /* no parity */
- 0x01, /* reserved */
- 0x00, 0x00, 0xb0, 0xb3};
-
- msg[8] = HI(speed);
- msg[9] = LO(speed);
- crc_sirf(msg);
- return (write(ttyfd, msg, 9+8) != 9+8);
-}
-
-#ifdef __UNUSED__
-int sirf_waas_ctrl(int ttyfd, int enable)
+static int sirf_waas_ctrl(int ttyfd, int enable)
/* enable or disable WAAS */
{
u_int8_t msg[] = {0xa0, 0xa2, 0x00, 0x07,
@@ -99,7 +96,7 @@
}
-int sirf_reset(int ttyfd)
+static int sirf_reset(int ttyfd)
/* reset GPS parameters */
{
u_int8_t msg[] = {0xa0, 0xa2, 0x00, 0x19,
@@ -119,7 +116,7 @@
}
-int sirf_dgps_source(int ttyfd, int source)
+static int sirf_dgps_source(int ttyfd, int source)
/* set source for DGPS corrections */
{
int i;
@@ -191,7 +188,7 @@
}
-int sirf_nav_lib (int ttyfd, int enable)
+static int sirf_nav_lib (int ttyfd, int enable)
/* set single-channel mode */
{
u_int8_t msg_1[] = {0xa0, 0xa2, 0x00, 0x19,
@@ -213,7 +210,7 @@
return (write(ttyfd, msg_1, 0x19+8) != 0x19+8);
}
-int sirf_power_mask(int ttyfd, int low)
+static int sirf_power_mask(int ttyfd, int low)
/* set dB cutoff level below which satellite info will be ignored */
{
u_int8_t msg[] = {0xa0, 0xa2, 0x00, 0x03,
@@ -228,7 +225,7 @@
}
-int sirf_power_save(int ttyfd, int enable)
+static int sirf_power_save(int ttyfd, int enable)
/* enable/disable SiRF trickle-power mode */
{
u_int8_t msg[] = {0xa0, 0xa2, 0x00, 0x09,
Deleted: trunk/sirf.h
===================================================================
--- trunk/sirf.h 2005-02-28 22:43:52 UTC (rev 1856)
+++ trunk/sirf.h 2005-02-28 23:16:45 UTC (rev 1857)
@@ -1,18 +0,0 @@
-/* sirf.h -- control functions for SiRF-II GPS chipset */
-
-#define DGPS_SOURCE_NONE 0
-#define DGPS_SOURCE_EXTERNAL 1
-#define DGPS_SOURCE_INTERNAL 2
-#define DGPS_SOURCE_WAAS 3
-
-int sirf_to_nmea(int, int);
-int sirf_speed(int, int);
-int sirf_reset(int);
-int sirf_dgps_source(int, int);
-int sirf_nav_lib(int, int);
-int sirf_waas_ctrl(int, int);
-int sirf_nmea_waas(int, int);
-int sirf_power_mask(int, int);
-int sirf_power_save(int, int);
-
-/* sirf.h ends here */
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic