Loading sensors/2.0/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ hidl_interface { "android.hidl.base@1.0", ], types: [ "EventQueueFlagBits", "SensorTimeout", ], gen_java: false, Loading sensors/2.0/ISensors.hal +4 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,10 @@ interface ISensors { * Data may only be written to the Event FMQ. Data must not be read from * the Event FMQ since the framework is the only reader. Upon receiving * sensor events, the HAL should write the sensor events to the Event FMQ. * Once the HAL is finished writing sensor events to the Event FMQ, the HAL * must call the Event FMQ's EventFlag wake() function with the * EventQueueFlagBits::READ_AND_PROCESS mask which notifies the framework * that sensor events are available to be read and processed. * * The Wake Lock FMQ is used by the framework to notify the HAL when it is * safe to release its wake_lock. When the framework receives WAKE_UP events Loading sensors/2.0/types.hal +7 −0 Original line number Diff line number Diff line Loading @@ -23,3 +23,10 @@ enum SensorTimeout : int32_t { */ WAKE_LOCK_SECONDS = 1, }; enum EventQueueFlagBits : uint32_t { /** * Used to notify the Event FMQ that events should be read and processed. */ READ_AND_PROCESS = 1 << 0, }; Loading
sensors/2.0/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ hidl_interface { "android.hidl.base@1.0", ], types: [ "EventQueueFlagBits", "SensorTimeout", ], gen_java: false, Loading
sensors/2.0/ISensors.hal +4 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,10 @@ interface ISensors { * Data may only be written to the Event FMQ. Data must not be read from * the Event FMQ since the framework is the only reader. Upon receiving * sensor events, the HAL should write the sensor events to the Event FMQ. * Once the HAL is finished writing sensor events to the Event FMQ, the HAL * must call the Event FMQ's EventFlag wake() function with the * EventQueueFlagBits::READ_AND_PROCESS mask which notifies the framework * that sensor events are available to be read and processed. * * The Wake Lock FMQ is used by the framework to notify the HAL when it is * safe to release its wake_lock. When the framework receives WAKE_UP events Loading
sensors/2.0/types.hal +7 −0 Original line number Diff line number Diff line Loading @@ -23,3 +23,10 @@ enum SensorTimeout : int32_t { */ WAKE_LOCK_SECONDS = 1, }; enum EventQueueFlagBits : uint32_t { /** * Used to notify the Event FMQ that events should be read and processed. */ READ_AND_PROCESS = 1 << 0, };