05523ca7e8aac37afc5bea3038109e58185435df
[apps/native/st-things-blind.git] / inc / resource / resource_illuminance_sensor.h
1 /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
3  *
4  * Contact: Jin Yoon <jinny.yoon@samsung.com>
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an AS IS BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 #ifndef __POSITION_FINDER_RESOURCE_ILLUMINANCE_SENSOR_H__
20 #define __POSITION_FINDER_RESOURCE_ILLUMINANCE_SENSOR_H__
21
22 /**
23  * @brief Reads the value of i2c bus connected illuminance sensor.
24  * @param[in] i2c_bus The i2c bus number that the slave device is connected
25  * @param[out] out_value The value read by the illuminance sensor
26  * @return 0 on success, otherwise a negative error value
27  * @see If the i2c bus is not open, creates i2c handle before reading data from the i2c slave device.
28  */
29 extern int resource_read_illuminance_sensor(int i2c_bus, uint32_t *out_value);
30
31 #endif /* __POSITION_FINDER_RESOURCE_ILLUMINANCE_SENSOR_H__ */
32