summaryrefslogtreecommitdiffstats
path: root/include/hardware/gps.h
diff options
context:
space:
mode:
authorTsuwei Chen <tsuwei@google.com>2014-08-26 16:34:19 -0700
committerTsuwei Chen <tsuwei@google.com>2014-08-30 00:16:14 +0000
commit167d31f52898717fe1680d29ea149ff9a03a5407 (patch)
treeaa69fd2fc1485191389e488f45ffacf6a07b7a6b /include/hardware/gps.h
parent6edd4d605f1c4a5b53d18382ff01c24225e94b01 (diff)
downloadhardware_libhardware-167d31f52898717fe1680d29ea149ff9a03a5407.zip
hardware_libhardware-167d31f52898717fe1680d29ea149ff9a03a5407.tar.gz
hardware_libhardware-167d31f52898717fe1680d29ea149ff9a03a5407.tar.bz2
Creates interface to dynamically configure GPS.
Bug: 17110478 Change-Id: I2a053d02e3c198d519d6306809f81ff601169151
Diffstat (limited to 'include/hardware/gps.h')
-rw-r--r--include/hardware/gps.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/include/hardware/gps.h b/include/hardware/gps.h
index eb44d5c..fff6402 100644
--- a/include/hardware/gps.h
+++ b/include/hardware/gps.h
@@ -394,7 +394,12 @@ typedef uint8_t GpsNavigationMessageType;
/**
* Name of the GPS navigation message interface.
*/
- #define GPS_NAVIGATION_MESSAGE_INTERFACE "gps_navigation_message"
+#define GPS_NAVIGATION_MESSAGE_INTERFACE "gps_navigation_message"
+
+/**
+ * Name of the GNSS/GPS configuration interface.
+ */
+#define GNSS_CONFIGURATION_INTERFACE "gnss_configuration"
/** Represents a location. */
@@ -1521,7 +1526,7 @@ typedef struct {
* The number of GPS bits transmitted since Sat-Sun midnight (GPS week).
* If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_BIT_NUMBER.
*/
- int16_t bit_number;
+ int32_t bit_number;
/**
* The elapsed time since the last received bit in milliseconds, in the range [0, 20]
@@ -1760,6 +1765,29 @@ typedef struct {
} GpsNavigationMessageInterface;
+/**
+ * Interface for passing GNSS configuration contents from platform to HAL.
+ */
+typedef struct {
+ /** Set to sizeof(GnssConfigurationInterface) */
+ size_t size;
+
+ /**
+ * Deliver GNSS configuration contents to HAL.
+ * Parameters:
+ * config_data - a pointer to a char array which holds what usually is expected from
+ file(/etc/gps.conf), i.e., a sequence of UTF8 strings separated by '\n'.
+ * length - total number of UTF8 characters in configuraiton data.
+ *
+ * IMPORTANT:
+ * GPS HAL should expect this function can be called multiple times. And it may be
+ * called even when GpsLocationProvider is already constructed and enabled. GPS HAL
+ * should maintain the existing requests for various callback regardless the change
+ * in configuration data.
+ */
+ void (*configuration_update) (const char* config_data, int32_t length);
+} GnssConfigurationInterface;
+
__END_DECLS
#endif /* ANDROID_INCLUDE_HARDWARE_GPS_H */