summaryrefslogtreecommitdiff
path: root/6515/libsensors_iio/sensors_mpl.cpp
diff options
context:
space:
mode:
authorNick Vaccaro <nvaccaro@google.com>2015-05-18 20:56:11 -0700
committerNick Vaccaro <nvaccaro@google.com>2015-05-18 20:56:11 -0700
commita03869ce9a355d3606fccdbab41edc7bb1d32024 (patch)
tree134f84c477572d7908b2197ee5a4a352822c577c /6515/libsensors_iio/sensors_mpl.cpp
parente9985026d78041cc9ea80ee7c59dd733bff44495 (diff)
parent9b7ebb5143dd692c20fc9348ae999450133dad57 (diff)
downloadinvensense-a03869ce9a355d3606fccdbab41edc7bb1d32024.tar.gz
Merge commit '9b7ebb51' into manualmerge
Change-Id: I22ed7a1963ca6a9f599c5e73a83af66cd4de8267
Diffstat (limited to '6515/libsensors_iio/sensors_mpl.cpp')
-rwxr-xr-x6515/libsensors_iio/sensors_mpl.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/6515/libsensors_iio/sensors_mpl.cpp b/6515/libsensors_iio/sensors_mpl.cpp
index df0a97f..268b853 100755
--- a/6515/libsensors_iio/sensors_mpl.cpp
+++ b/6515/libsensors_iio/sensors_mpl.cpp
@@ -106,7 +106,7 @@ struct sensors_poll_context_t {
int pollEvents(sensors_event_t* data, int count);
int query(int what, int *value);
int batch(int handle, int flags, int64_t period_ns, int64_t timeout);
-#if defined ANDROID_KITKAT
+#if defined ANDROID_KITKAT || defined ANDROID_LOLLIPOP
int flush(int handle);
#endif
@@ -340,7 +340,8 @@ int sensors_poll_context_t::batch(int handle, int flags, int64_t period_ns,
return mSensor->batch(handle, flags, period_ns, timeout);
}
-#if defined ANDROID_KITKAT
+#if defined ANDROID_KITKAT || defined ANDROID_LOLLIPOP
+
void inv_pending_flush(int handle) {
struct handle_entry *the_entry;
pthread_mutex_lock(&flush_handles_mutex);
@@ -410,7 +411,7 @@ static int poll__batch(struct sensors_poll_device_1 *dev,
return ctx->batch(handle, flags, period_ns, timeout);
}
-#if defined ANDROID_KITKAT
+#if defined ANDROID_KITKAT || defined ANDROID_LOLLIPOP
static int poll__flush(struct sensors_poll_device_1 *dev,
int handle)
{
@@ -437,7 +438,7 @@ static int open_sensors(const struct hw_module_t* module, const char* id,
memset(&dev->device, 0, sizeof(sensors_poll_device_1));
dev->device.common.tag = HARDWARE_DEVICE_TAG;
-#if defined ANDROID_KITKAT
+#if defined ANDROID_KITKAT || defined ANDROID_LOLLIPOP
dev->device.common.version = SENSORS_DEVICE_API_VERSION_1_3;
dev->device.flush = poll__flush;
#else