Init master branch with timer code
[apps/native/st-things-light.git] / inc / resource / resource_led.h
1 /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __RESOURCE_LED_H__
18 #define __RESOURCE_LED_H__
19
20 /**
21  * @brief Writes value of gpio connected led light
22  * @param[in] pin_num The gpio pin number for the led light
23  * @param[out] out_value The value of turniing the led light on/off
24  * @return 0 on success, otherwise a negative error value
25  * @see If the gpio pin is not open, create gpio handle before writing the value
26  */
27 extern int resource_write_led(int pin_num, int write_value);
28
29 /**
30  * @brief Releases the gpio handle
31  */
32 extern void resource_close_led(void);
33
34 #endif /* __RESOURCE_LED_H__ */