summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/common/gps.c
diff options
context:
space:
mode:
authorDario Lombardo <dario.lombardo@libero.it>2011-02-10 09:56:33 +0100
committerHarald Welte <laforge@gnumonks.org>2011-02-16 15:15:07 +0100
commit26ff2ee8802d7c8e8980d7c4cbfcd9053c6f3091 (patch)
tree37181f2f8d794bc94c97a6cfdaf4c7d68f9e150a /src/host/layer23/src/common/gps.c
parentdf566b6e4ae39c0d53d9612e6a893aaa45e5c45b (diff)
Renamed gps_* functions to osmo_gps_* functions to avoid overlap with libgps functions.
Diffstat (limited to 'src/host/layer23/src/common/gps.c')
-rw-r--r--src/host/layer23/src/common/gps.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/host/layer23/src/common/gps.c b/src/host/layer23/src/common/gps.c
index a092cd03..dfca3b2b 100644
--- a/src/host/layer23/src/common/gps.c
+++ b/src/host/layer23/src/common/gps.c
@@ -33,7 +33,7 @@
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/gps.h>
-struct gps gps = {
+struct osmo_gps gps = {
0,
"/dev/ttyACM0",
0,
@@ -46,7 +46,7 @@ struct gps gps = {
static struct bsc_fd gps_bfd;
static struct termios gps_termios, gps_old_termios;
-static int gps_line(char *line)
+static int osmo_gps_line(char *line)
{
time_t gps_now, host_now;
struct tm *tm;
@@ -141,7 +141,7 @@ static int nmea_checksum(char *line)
return (strtoul(line+1, NULL, 16) == checksum);
}
-int gps_cb(struct bsc_fd *bfd, unsigned int what)
+int osmo_gps_cb(struct bsc_fd *bfd, unsigned int what)
{
char buff[128];
static char line[128];
@@ -165,7 +165,7 @@ int gps_cb(struct bsc_fd *bfd, unsigned int what)
if (!nmea_checksum(line))
fprintf(stderr, "NMEA checksum error\n");
else
- gps_line(line);
+ osmo_gps_line(line);
continue;
}
line[lpos++] = buff[i++];
@@ -176,7 +176,7 @@ int gps_cb(struct bsc_fd *bfd, unsigned int what)
return 0;
}
-int gps_open(void)
+int osmo_gps_open(void)
{
int baud = 0;
@@ -187,7 +187,7 @@ int gps_open(void)
gps_bfd.data = NULL;
gps_bfd.when = BSC_FD_READ;
- gps_bfd.cb = gps_cb;
+ gps_bfd.cb = osmo_gps_cb;
gps_bfd.fd = open(gps.device, O_RDONLY);
if (gps_bfd.fd < 0)
return gps_bfd.fd;
@@ -227,7 +227,7 @@ int gps_open(void)
return 0;
}
-void gps_close(void)
+void osmo_gps_close(void)
{
if (gps_bfd.fd <= 0)
return;
@@ -243,7 +243,7 @@ void gps_close(void)
gps_bfd.fd = -1; /* -1 or 0 indicates: 'close' */
}
-void gps_init(void)
+void osmo_gps_init(void)
{
memset(&gps_bfd, 0, sizeof(gps_bfd));
}