Initialization
[platform/hal/api/device.git] / include / hal-led-internal.h
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
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
18 #ifndef __TIZEN_SYSTEM_LED_INTERNAL_H__
19 #define __TIZEN_SYSTEM_LED_INTERNAL_H__
20
21
22 #include "device-error.h"
23
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29
30 /**
31  * @brief Gets the total number of LEDs in the device.
32  * @since_tizen @if MOBILE 5.0 @elseif WEARABLE 5.0 @endif
33  * @privlevel public
34  * @privilege %http://tizen.org/privilege/led
35  * @remarks This API is related to the following feature: %http://tizen.org/feature/led
36  * @param[out] Number of LEDs
37  * @return @c 0 on success,
38  *         otherwise a negative error value
39  * @retval #DEVICE_ERROR_NONE Successful
40  * @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter
41  * @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied
42  * @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed
43  * @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device
44  */
45 int device_multi_led_get_number(int *num_of_leds);
46
47 /**
48  * @brief Plays multiple LEDs at the same time.
49  * @since_tizen @if MOBILE 5.0 @elseif WEARABLE 5.0 @endif
50  * @privlevel public
51  * @privilege %http://tizen.org/privilege/led
52  * @remarks This API is related to the following feature: %http://tizen.org/feature/led
53  * @remarks The array size must be the same as the number of LEDs, which is obtained by device_multi_led_get_number().
54  * @param[in] color[] The Color value for each LED\n
55  *                    The first byte means opaque, and the other 3 bytes mean RGB values
56  * @return @c 0 on success,
57  *         otherwise a negative error value
58  * @retval #DEVICE_ERROR_NONE Successful
59  * @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter
60  * @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied
61  * @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed
62  * @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device
63  */
64 int device_multi_led_control(unsigned int color[]);
65
66
67 #ifdef __cplusplus
68 }
69 #endif
70
71
72 #endif  // __TIZEN_SYSTEM_LED_INTERNAL_H__