summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnss/GnssAdapter.cpp2
-rw-r--r--utils/gps_extended_c.h43
-rw-r--r--utils/loc_gps.h2
3 files changed, 26 insertions, 21 deletions
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp
index 8e1bf5f..0775c2a 100644
--- a/gnss/GnssAdapter.cpp
+++ b/gnss/GnssAdapter.cpp
@@ -1636,7 +1636,7 @@ GnssAdapter::gnssSvTypeConfigUpdate(const GnssSvTypeConfig& config)
void
GnssAdapter::gnssSvTypeConfigUpdate(bool sendReset)
{
- LOC_LOGd("size %zu constellations blacklisted 0x%" PRIx64 ", enabled 0x%" PRIx64
+ LOC_LOGd("size %" PRIu32" constellations blacklisted 0x%" PRIx64 ", enabled 0x%" PRIx64
", sendReset %d",
mGnssSvTypeConfig.size, mGnssSvTypeConfig.blacklistedSvTypesMask,
mGnssSvTypeConfig.enabledSvTypesMask, sendReset);
diff --git a/utils/gps_extended_c.h b/utils/gps_extended_c.h
index 9f4c13c..9c63166 100644
--- a/utils/gps_extended_c.h
+++ b/utils/gps_extended_c.h
@@ -35,7 +35,12 @@
#include <string.h>
#include <loc_gps.h>
#include <LocationAPI.h>
-#include <time.h>
+
+struct timespec32_t {
+ uint32_t tv_sec; /* seconds */
+ uint32_t tv_nsec; /* and nanoseconds */
+};
+
/**
* @file
@@ -132,7 +137,7 @@ typedef enum {
typedef struct {
/** set to sizeof(UlpLocation) */
- size_t size;
+ uint32_t size;
LocGpsLocation gpsLocation;
/* Provider indicator for HYBRID or GPS */
uint16_t position_source;
@@ -142,7 +147,7 @@ typedef struct {
typedef struct {
/** set to sizeof(UlpNmea) */
- size_t size;
+ uint32_t size;
char nmea_str[ULP_MAX_NMEA_STRING_SIZE];
unsigned int len;
} UlpNmea;
@@ -208,7 +213,7 @@ typedef struct {
/** GPS extended callback structure. */
typedef struct {
/** set to sizeof(LocGpsCallbacks) */
- size_t size;
+ uint32_t size;
loc_gps_set_capabilities set_capabilities_cb;
loc_gps_acquire_wakelock acquire_wakelock_cb;
loc_gps_release_wakelock release_wakelock_cb;
@@ -232,7 +237,7 @@ typedef struct {
/** Represents the status of AGPS. */
typedef struct {
/** set to sizeof(AGpsExtStatus) */
- size_t size;
+ uint32_t size;
AGpsExtType type;
LocAGpsStatusValue status;
@@ -458,7 +463,7 @@ typedef enum {
}LocReliability;
typedef struct {
- struct timespec apTimeStamp;
+ struct timespec32_t apTimeStamp;
/*boottime received from pps-ktimer*/
float apTimeStampUncertaintyMs;
/* timestamp uncertainty in milli seconds */
@@ -685,7 +690,7 @@ typedef struct {
/** Represents gps location extended. */
typedef struct {
/** set to sizeof(GpsLocationExtended) */
- size_t size;
+ uint32_t size;
/** Contains GpsLocationExtendedFlags bits. */
uint64_t flags;
/** Contains the Altitude wrt mean sea level */
@@ -1058,7 +1063,7 @@ typedef enum
typedef struct
{
- size_t size;
+ uint32_t size;
float clockDrift;
/**< Receiver clock Drift \n
- Units: meter per sec \n
@@ -1072,7 +1077,7 @@ typedef struct
typedef struct
{
- size_t size;
+ uint32_t size;
uint8_t leapSec;
/**< GPS time leap second delta to UTC time \n
- Units: sec \n
@@ -1093,7 +1098,7 @@ typedef enum
typedef struct
{
- size_t size;
+ uint32_t size;
uint32_t validMask;
/* Validity mask as per Gnss_LocInterSystemBiasValidMaskType */
@@ -1110,7 +1115,7 @@ typedef struct
typedef struct {
- size_t size;
+ uint32_t size;
uint8_t systemRtc_valid;
/**< Validity indicator for System RTC */
@@ -1156,7 +1161,7 @@ typedef enum
typedef struct
{
- size_t size;
+ uint32_t size;
uint32_t svMs;
/**< Satellite time milisecond.\n
For GPS, BDS, GAL range of 0 thru (604800000-1) \n
@@ -1216,7 +1221,7 @@ typedef enum
typedef struct
{
- size_t size;
+ uint32_t size;
Gnss_LocSvSystemEnumType gnssSystem;
// 0 signal type mask indicates invalid value
GnssSignalTypeMask gnssSignalTypeMask;
@@ -1389,7 +1394,7 @@ typedef uint64_t GpsSvMeasHeaderFlags;
typedef struct
{
- size_t size;
+ uint32_t size;
// see defines in GNSS_SV_MEAS_HEADER_HAS_XXX_XXX
uint64_t flags;
@@ -1433,7 +1438,7 @@ typedef struct
} GnssSvMeasurementHeader;
typedef struct {
- size_t size;
+ uint32_t size;
bool isNhz;
GnssSvMeasurementHeader svMeasSetHeader;
uint32_t svMeasCount;
@@ -1473,7 +1478,7 @@ typedef enum
typedef struct
{
- size_t size;
+ uint32_t size;
uint16_t gnssSvId;
/* GPS: 1-32, GLO: 65-96, 0: Invalid,
SBAS: 120-151, BDS:201-237,GAL:301 to 336
@@ -2034,7 +2039,7 @@ typedef enum {
typedef struct
{
- size_t size;
+ uint32_t size;
Gnss_SrnTech srnTechType; /* SRN Technology type in request */
bool srnRequest; /* scan - start(true) or stop(false) */
bool e911Mode; /* If in E911 emergency */
@@ -2054,7 +2059,7 @@ typedef enum {
/* This SV Type config is injected directly to GNSS Adapter
* bypassing Location API */
typedef struct {
- size_t size; // set to sizeof(GnssSvTypeConfig)
+ uint32_t size; // set to sizeof(GnssSvTypeConfig)
// Enabled Constellations
GnssSvTypesMask enabledSvTypesMask;
// Disabled Constellations
@@ -2141,7 +2146,7 @@ enum OdcpiRequestType {
ODCPI_REQUEST_TYPE_STOP
};
struct OdcpiRequestInfo {
- size_t size;
+ uint32_t size;
OdcpiRequestType type;
uint32_t tbfMillis;
bool isEmergencyMode;
diff --git a/utils/loc_gps.h b/utils/loc_gps.h
index b58f20b..eae7383 100644
--- a/utils/loc_gps.h
+++ b/utils/loc_gps.h
@@ -548,7 +548,7 @@ typedef uint8_t LocGnssConstellationType;
/** Represents a location. */
typedef struct {
/** set to sizeof(LocGpsLocation) */
- size_t size;
+ uint32_t size;
/** Contains LocGpsLocationFlags bits. */
uint16_t flags;
/** The spoof mask */