summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTsuwei Chen <tsuwei@google.com>2014-09-02 17:01:22 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-02 17:01:23 +0000
commit02516c78f372f4ad2b5aef63794f5c08ababbf6b (patch)
tree758815d30c7f019f25f471a14fb9ec125356aaf8
parentf0f67e6af93a601546b1d915b147dda5da295a1f (diff)
parent167d31f52898717fe1680d29ea149ff9a03a5407 (diff)
downloadlibhardware-02516c78f372f4ad2b5aef63794f5c08ababbf6b.tar.gz
Merge "Creates interface to dynamically configure GPS. Bug: 17110478 Change-Id: I2a053d02e3c198d519d6306809f81ff601169151" into lmp-dev
-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 eb44d5cd..fff64025 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 */