summaryrefslogtreecommitdiff
path: root/libloragw/inc/loragw_gps.h
diff options
context:
space:
mode:
Diffstat (limited to 'libloragw/inc/loragw_gps.h')
-rw-r--r--libloragw/inc/loragw_gps.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/libloragw/inc/loragw_gps.h b/libloragw/inc/loragw_gps.h
index 0714974..3accae2 100644
--- a/libloragw/inc/loragw_gps.h
+++ b/libloragw/inc/loragw_gps.h
@@ -30,6 +30,7 @@ Maintainer: Michael Coracin
#include <gpsd.h>
#include <gpsdclient.h>
#include <errno.h> /* error messages */
+#include <sys/stat.h>
#include "config.h" /* library configuration options (dynamically generated) */
/* -------------------------------------------------------------------------- */
@@ -102,19 +103,21 @@ enum gps_msg {
/**
@brief 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
+@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
*/
-int lgw_gps_enable(struct gps_data_t *gpsdata, struct fixsource_t *source);
+int lgw_gps_enable(char* tty_path, char* gps_familly, speed_t target_brate, int* fd_ptr, int slot);
/**
@brief Restore GPS serial configuration and close serial device
-@param gpsdata handler for gpsd data
+@param fd file descriptor on GPS tty
@return success if the function was able to complete
*/
-int lgw_gps_disable(struct gps_data_t *gpsdata);
+int lgw_gps_disable(int fd);
/**
@brief Get updated leap seconds
@@ -180,7 +183,7 @@ int lgw_gps_get(struct timespec *utc, struct timespec *gps_time, struct coord_s
Set systime to 0 in ref to trigger initial synchronization.
*/
-int lgw_gps_sync(struct tref *ref, uint32_t count_us, struct timespec gps_time);
+int lgw_gps_sync(struct tref *ref, uint32_t count_us, struct timespec utc, struct timespec gps_time);
/**
@brief Convert concentrator timestamp counter value to UTC time