summaryrefslogtreecommitdiff
path: root/board/nocturne/led.c
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2018-06-20 15:21:43 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-06-27 13:52:35 -0700
commit11d1b48c55dff5af8268b768e43369be8c6953d4 (patch)
treeb780d2b4bd23a880cca26ec5c21a92600f8fa8eb /board/nocturne/led.c
parent16d407fbbb9577292c7afcae5e10c5a3ef523647 (diff)
downloadchrome-ec-11d1b48c55dff5af8268b768e43369be8c6953d4.tar.gz
nocturne: Update LED settings.
- Enable active charge port feature. - Change battery full colour to white. - Slightly tweak colours. BUG=b:69138917, b:74601646 BRANCH=None TEST=Flash nocturne; verify LEDs conform to new behaviour. Change-Id: I9e9d234e94f3d8b5b18a8041da574fd4dabae04d Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/1109033 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'board/nocturne/led.c')
-rw-r--r--board/nocturne/led.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/board/nocturne/led.c b/board/nocturne/led.c
index 68b19f0bbe..993e0c4c1a 100644
--- a/board/nocturne/led.c
+++ b/board/nocturne/led.c
@@ -17,14 +17,13 @@ const enum ec_led_id supported_led_ids[] = {
};
const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids);
-/* We may not be using the blue channel long term. */
struct pwm_led led_color_map[EC_LED_COLOR_COUNT] = {
/* Red, Green, Blue */
[EC_LED_COLOR_RED] = { 1, 0, 0 },
[EC_LED_COLOR_GREEN] = { 0, 1, 0 },
- [EC_LED_COLOR_BLUE] = { 0, 0, 0 },
+ [EC_LED_COLOR_BLUE] = { 0, 0, 1 },
[EC_LED_COLOR_YELLOW] = { 1, 1, 0 },
- [EC_LED_COLOR_WHITE] = { 0, 0, 0 },
+ [EC_LED_COLOR_WHITE] = { 9, 15, 15 },
[EC_LED_COLOR_AMBER] = { 15, 1, 0 },
};
@@ -49,8 +48,8 @@ void led_get_brightness_range(enum ec_led_id led_id, uint8_t *brightness_range)
brightness_range[EC_LED_COLOR_GREEN] = 100;
brightness_range[EC_LED_COLOR_YELLOW] = 100;
brightness_range[EC_LED_COLOR_AMBER] = 100;
- brightness_range[EC_LED_COLOR_BLUE] = 0;
- brightness_range[EC_LED_COLOR_WHITE] = 0;
+ brightness_range[EC_LED_COLOR_BLUE] = 100;
+ brightness_range[EC_LED_COLOR_WHITE] = 100;
}
int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness)
@@ -73,6 +72,10 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness)
set_pwm_led_color(pwm_id, EC_LED_COLOR_YELLOW);
else if (brightness[EC_LED_COLOR_AMBER])
set_pwm_led_color(pwm_id, EC_LED_COLOR_AMBER);
+ else if (brightness[EC_LED_COLOR_BLUE])
+ set_pwm_led_color(pwm_id, EC_LED_COLOR_BLUE);
+ else if (brightness[EC_LED_COLOR_WHITE])
+ set_pwm_led_color(pwm_id, EC_LED_COLOR_WHITE);
else
/* Otherwise, the "color" is "off". */
set_pwm_led_color(pwm_id, -1);