Chromium Code Reviews| Index: device/generic_sensor/iio/sensor_data_iio.h |
| diff --git a/device/generic_sensor/iio/sensor_data_iio.h b/device/generic_sensor/iio/sensor_data_iio.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f1053f24f0501f10a67bc815f0851f43f87f8b71 |
| --- /dev/null |
| +++ b/device/generic_sensor/iio/sensor_data_iio.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef DEVICE_GENERIC_SENSOR_SENSOR_DATA_IIO_H_ |
| +#define DEVICE_GENERIC_SENSOR_SENSOR_DATA_IIO_H_ |
|
Mikhail
2016/10/14 13:59:04
looks like it's better to create 'iio' folder and
maksims (do not use this acc)
2016/10/17 06:06:59
It's already there. Haven't changed the string her
|
| + |
| +#include "device/generic_sensor/public/interfaces/sensor.mojom.h" |
| + |
| +namespace device { |
| + |
| +namespace { |
| + |
| +const char kBasePathSensorIio[] = FILE_PATH_LITERAL("/sys/bus/iio/devices"); |
|
Mikhail
2016/10/14 13:59:04
Declaring them like this would cause copying in ev
maksims (do not use this acc)
2016/10/17 06:06:59
Done.
|
| + |
| +const size_t kMaxRows = 3; |
| + |
| +} // namespace |
| + |
| +struct SensorDataIio { |
| + const char* base_path_sensor_iio = kBasePathSensorIio; |
| + const char** sensor_file_names[kMaxRows]; |
| + size_t sensor_file_names_cols; |
| + size_t sensor_file_names_rows; |
| + mojom::ReportingMode reporting_mode; |
| + PlatformSensorConfiguration default_configuration; |
| +}; |
| + |
| +bool CreateSensorData(mojom::SensorType type, SensorDataIio* data); |
| + |
| +} // namespace device |
| + |
| +#endif // DEVICE_GENERIC_SENSOR_SENSOR_DATA_IIO_H_ |