Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: device/generic_sensor/iio/sensor_data_iio.h

Issue 2370343002: [sensors] Ambient light sensor implementation for ChromeOS and Linux. (Closed)
Patch Set: Comments from Alex Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef DEVICE_GENERIC_SENSOR_IIO_SENSOR_DATA_IIO_H_
6 #define DEVICE_GENERIC_SENSOR_IIO_SENSOR_DATA_IIO_H_
7
8 #include "device/generic_sensor/public/interfaces/sensor.mojom.h"
9
10 namespace device {
11
12 // This structure represents a context that is used to
13 // create a type specific SensorReader and a concrete
14 // sensor that uses the SensorReader to read sensor
15 // data from files specified in the |sensor_file_names|.
16 struct SensorDataIio {
17 // Provides a base path to all sensors.
18 const base::FilePath::CharType* base_path_sensor_iio;
19 // Provides an array of sensor file names to be searched for.
20 const char** sensor_file_names[3];
Reilly Grant (use Gerrit) 2016/10/24 21:49:27 Since we have a function that builds these structu
maksims (do not use this acc) 2016/10/25 06:23:54 Basically, the data is static and is defined only
Reilly Grant (use Gerrit) 2016/10/25 17:36:25 A vector of vectors is the right data structure fo
21 // Number of files in each |sensor_file_names| array.
22 size_t sensor_file_names_cols;
23 // Number of arrays in |sensor_file_names|.
24 // Corresponds to the sensor reading fields number.
25 size_t sensor_file_names_rows;
26 // Reporting mode of a sensor.
27 mojom::ReportingMode reporting_mode;
28 // Default configuration of a sensor.
29 PlatformSensorConfiguration default_configuration;
30 };
31
32 // Initializes a sensor type specific data.
33 bool InitSensorData(mojom::SensorType type, SensorDataIio* data);
34
35 } // namespace device
36
37 #endif // DEVICE_GENERIC_SENSOR_IIO_SENSOR_DATA_IIO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698