/* Reads the sensor and returns the data as a sensors_event_t.  */
err_t mpl115a2GetSensorEvent(sensors_event_t *event)
/* Reads the sensor and returns the data as a sensors_event_t.  */
err_t mpl115a2GetSensorEvent(sensors_event_t *event)
{
  float pressure_kPa;
  memset(event, 0, sizeof(sensors_event_t));
  event->version   = sizeof(sensors_event_t);
  event->sensor_id = _mpl115a2SensorID;
  event->type      = SENSOR_TYPE_PRESSURE;
  event->timestamp = delayGetTicks();
  ASSERT_STATUS(mpl115a2GetPressure(&pressure_kPa));
  event->pressure = pressure_kPa * 10;
  return ERROR_NONE;
}