-void resource_led_bi_set(bi_led_color_e color)
-{
- _D("Set led to: %d", color);
- if (color == s_info.current_color) {
- _D("No change in bi led");
- return;
- }
-
- s_info.current_color = color;
- _led_bi_set(color);
-}
-
-void resource_led_bi_blink(bi_led_color_e color, unsigned timeout)
-{
- if (color == s_info.current_color) {
- _D("No change in bi led");
- return;
- }
-
- _led_bi_set(color);
- g_timeout_add(timeout, _restore_bi_color_cb, NULL);
-}
-
-void resource_led_rgb_gpio_set(bool red, bool green, bool blue)
-{
- if (red == s_info.current_rgb_gpio_color[0] &&
- green == s_info.current_rgb_gpio_color[1] &&
- blue == s_info.current_rgb_gpio_color[2]) {
- _D("No change in gpio led");
- return;
- }
-
-
- s_info.current_rgb_gpio_color[0] = red;
- s_info.current_rgb_gpio_color[1] = green;
- s_info.current_rgb_gpio_color[2] = blue;
-
- _rgb_gpio_set(red, green, blue);
-}
-
-void resource_led_gpio_rgb_blink(bool red, bool green, bool blue, unsigned timeout)
-{
- if (red == s_info.current_rgb_gpio_color[0] &&
- green == s_info.current_rgb_gpio_color[1] &&
- blue == s_info.current_rgb_gpio_color[2]) {
- _D("No change in gpio led");
- return;
- }
-
- _rgb_gpio_set(red, green, blue);
- g_timeout_add(timeout, _restore_rgb_gpio_color_cb, NULL);
-}
-
-void resource_led_rgb_l2c_set(int red, int green, int blue)
-{
- if (red == s_info.current_rgb_l2c_color[0] &&
- green == s_info.current_rgb_l2c_color[1] &&
- blue == s_info.current_rgb_l2c_color[2]) {
- _D("No change in l2c led");
- return;
- }
-
- s_info.current_rgb_l2c_color[0] = red;
- s_info.current_rgb_l2c_color[1] = green;
- s_info.current_rgb_l2c_color[2] = blue;
-
- _rgb_l2c_set(red, green, blue);
-}
-
-void resource_led_rgb_l2c_blink(int red, int green, int blue, unsigned timeout)
-{
- if (red == s_info.current_rgb_l2c_color[0] &&
- green == s_info.current_rgb_l2c_color[1] &&
- blue == s_info.current_rgb_l2c_color[2]) {
- _D("No change in l2c led");
- return;
- }
-
- _rgb_l2c_set(red, green, blue);
- g_timeout_add(timeout, _restore_rgb_l2c_color_cb, NULL);
-}
-
-void resource_led_set_rgb_colors(char *key,