From 54b764826671d750d40d1b717f2a171a093aaafb Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Thu, 21 Apr 2022 16:22:04 -0500 Subject: Changed gps functions to use gpspipe --- libloragw/inc/loragw_gps.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'libloragw/inc') 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 #include #include /* error messages */ +#include #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 -- cgit v1.2.3