summaryrefslogtreecommitdiff
path: root/libloragw/inc
diff options
context:
space:
mode:
Diffstat (limited to 'libloragw/inc')
-rw-r--r--libloragw/inc/loragw_gps.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/libloragw/inc/loragw_gps.h b/libloragw/inc/loragw_gps.h
index 6dbd30b..59b2d37 100644
--- a/libloragw/inc/loragw_gps.h
+++ b/libloragw/inc/loragw_gps.h
@@ -27,9 +27,11 @@ Maintainer: Michael Coracin
#include <time.h> /* time library */
#include <termios.h> /* speed_t */
#include <unistd.h> /* ssize_t */
+#include <gpsd.h>
+#include <gpsdclient.h>
+#include <errno.h> /* error messages */
#include "config.h" /* library configuration options (dynamically generated) */
-
/* -------------------------------------------------------------------------- */
/* --- PUBLIC TYPES --------------------------------------------------------- */
@@ -83,6 +85,7 @@ enum gps_msg {
UBX_NAV_TIMEUTC /*!> UTC Time Solution */
};
+// struct gps_data_t gpsdata;
/* -------------------------------------------------------------------------- */
/* --- PUBLIC CONSTANTS ----------------------------------------------------- */
@@ -99,21 +102,19 @@ enum gps_msg {
/**
@brief Configure a GPS module
-@param tty_path path to the TTY connected to the GPS
-@param gps_familly parameter (eg. ubx6 for uBlox gen.6)
-@param target_brate target baudrate for communication (0 keeps default target baudrate)
-@param fd_ptr pointer to a variable to receive file descriptor on GPS tty
-@return success if the function was able to connect and configure a GPS module
+@param gpsdata handler for gpsd data
+@param source source for setup of gpsd
+@return success if the function was able to connect and configure a GPSD stream
*/
-int lgw_gps_enable(char* tty_path, char* gps_familly, speed_t target_brate, int* fd_ptr);
+int lgw_gps_enable(struct gps_data_t *gpsdata, struct fixsource_t *source);
/**
@brief Restore GPS serial configuration and close serial device
-@param fd file descriptor on GPS tty
+@param gpsdata handler for gpsd data
@return success if the function was able to complete
*/
-int lgw_gps_disable(int fd);
+int lgw_gps_disable(struct gps_data_t *gpsdata);
/**
@brief Parse messages coming from the GPS system (or other GNSS)