Lines Matching defs:events
167 * new sensor events after the activate() call in 2).
208 * pending events, return -EINVAL.
247 /* Block until new sensor events are reported by the emulator, or if a
266 // Accumulate pending events into |events| and |new_sensors| mask
270 sensors_event_t* events = dev->sensors;
312 if (events[ID_ACCELERATION].type == SENSOR_TYPE_META_DATA) continue;
313 events[ID_ACCELERATION].acceleration.x = params[0];
314 events[ID_ACCELERATION].acceleration.y = params[1];
315 events[ID_ACCELERATION].acceleration.z = params[2];
316 events[ID_ACCELERATION].type = SENSOR_TYPE_ACCELEROMETER;
325 if (events[ID_ORIENTATION].type == SENSOR_TYPE_META_DATA) continue;
326 events[ID_ORIENTATION].orientation.azimuth = params[0];
327 events[ID_ORIENTATION].orientation.pitch = params[1];
328 events[ID_ORIENTATION].orientation.roll = params[2];
329 events[ID_ORIENTATION].orientation.status =
331 events[ID_ORIENTATION].type = SENSOR_TYPE_ORIENTATION;
340 if (events[ID_MAGNETIC_FIELD].type == SENSOR_TYPE_META_DATA) continue;
341 events[ID_MAGNETIC_FIELD].magnetic.x = params[0];
342 events[ID_MAGNETIC_FIELD].magnetic.y = params[1];
343 events[ID_MAGNETIC_FIELD].magnetic.z = params[2];
344 events[ID_MAGNETIC_FIELD].magnetic.status =
346 events[ID_MAGNETIC_FIELD].type = SENSOR_TYPE_MAGNETIC_FIELD;
353 if (events[ID_TEMPERATURE].type == SENSOR_TYPE_META_DATA) continue;
354 events[ID_TEMPERATURE].temperature = params[0];
355 events[ID_TEMPERATURE].type = SENSOR_TYPE_AMBIENT_TEMPERATURE;
362 if (events[ID_PROXIMITY].type == SENSOR_TYPE_META_DATA) continue;
363 events[ID_PROXIMITY].distance = params[0];
364 events[ID_PROXIMITY].type = SENSOR_TYPE_PROXIMITY;
370 if (events[ID_LIGHT].type == SENSOR_TYPE_META_DATA) continue;
371 events[ID_LIGHT].light = params[0];
372 events[ID_LIGHT].type = SENSOR_TYPE_LIGHT;
379 if (events[ID_PRESSURE].type == SENSOR_TYPE_META_DATA) continue;
380 events[ID_PRESSURE].pressure = params[0];
381 events[ID_PRESSURE].type = SENSOR_TYPE_PRESSURE;
388 if (events[ID_HUMIDITY].type == SENSOR_TYPE_META_DATA) continue;
389 events[ID_HUMIDITY].relative_humidity = params[0];
390 events[ID_HUMIDITY].type = SENSOR_TYPE_RELATIVE_HUMIDITY;
394 /* "sync:<time>" is sent after a series of sensor events.
420 * events were sent.
422 * time and take the lower value - we don't believe in events from the
461 * related events to report. On success, it will write the events into the
463 * of events written into the array, which shall never be greater than |count|.
483 /* Block until there are pending events. Note that this releases
497 /* Now read as many pending events as needed. */