Config for different led colors displaying the car states
[apps/native/gear-racing-car.git] / inc / resource / resource_led.h
1 /*
2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
3 *
4 * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 RESOURCE_RESOURCE_LED_H_
19 #define RESOURCE_RESOURCE_LED_H_
20
21 #include <stdbool.h>
22
23 typedef enum _led_color_e {
24         LED_COLOR_NONE = -1,
25         LED_COLOR_RED = 0,
26         LED_COLOR_GREEN = 1,
27 } bi_led_color_e;
28
29 void resource_led_init(void);
30 void resource_led_destroy(void);
31 void resource_led_bi_set(bi_led_color_e color);
32 void resource_led_bi_blink(bi_led_color_e color, unsigned timeout);
33 void resource_led_rgb_gpio_set(bool red, bool green, bool blue);
34 void resource_led_gpio_rgb_blink(bool red, bool green, bool blue, unsigned timeout);
35 void resource_led_rgb_l2c_set(int red, int green, int blue);
36 void resource_led_rgb_l2c_blink(int red, int green, int blue, unsigned timeout);
37 void resource_led_set_rgb_colors(char *key,
38                 int def_r_3bit, int def_g_3bit, int def_b_3bit,
39                 int def_r_24bit, int def_g_24bit, int def_b_24bit,
40                 bi_led_color_e bi_led);
41 void resource_led_blink_rgb_colors(char *key,
42                 int def_r_3bit, int def_g_3bit, int def_b_3bit,
43                 int def_r_24bit, int def_g_24bit, int def_b_24bit,
44                 bi_led_color_e bi_led, int timeout);
45
46 #endif /* RESOURCE_RESOURCE_LED_H_ */