diff options
author | Todd Broch <tbroch@chromium.org> | 2015-08-15 23:08:32 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-08-21 00:49:26 +0000 |
commit | f0a1e5dfd1579c127c3bd3064978867efddfaf20 (patch) | |
tree | 67b3a299c93bade1ae1d2771342bd6261ba0ae10 | |
parent | 60ddfc8310b268cf8908587d88da741c64eb55bc (diff) | |
download | chrome-ec-f0a1e5dfd1579c127c3bd3064978867efddfaf20.tar.gz |
ryu: re-calibrate lightbar colors for device.
Signed-off-by: Todd Broch <tbroch@chromium.org>
BRANCH=smaug
BUG=chrome-os-partner:44029
TEST=manual,
1. Boot device into S0
2. From EC console
lightbar
...
15 0f 06
16 0f 20
17 16 08
18 06 21
19 26 11
1a 1d 0b
These values match requested values.
Change-Id: Ib65044510ac24bd41d63586534685f995fcb131d
Reviewed-on: https://chromium-review.googlesource.com/294840
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>
-rw-r--r-- | common/lb_common.c | 7 | ||||
-rw-r--r-- | common/lightbar.c | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/common/lb_common.c b/common/lb_common.c index 56733ad466..9a8c4a666e 100644 --- a/common/lb_common.c +++ b/common/lb_common.c @@ -143,7 +143,7 @@ static inline uint8_t controller_read(int ctrl_num, uint8_t reg) #define MAX_GREEN 0x30 #define MAX_BLUE 0x67 #endif -#if defined(BOARD_SAMUS) || defined(BOARD_RYU) +#if defined(BOARD_SAMUS) /* Samus uses completely different LEDs, so the numbers are different. The * Samus LEDs can handle much higher currents, but these constants were * calibrated to provide uniform intensity at the level used by Link. @@ -152,6 +152,11 @@ static inline uint8_t controller_read(int ctrl_num, uint8_t reg) #define MAX_GREEN 0x2c #define MAX_BLUE 0x40 #endif +#if defined(BOARD_RYU) +#define MAX_RED 0xb4 +#define MAX_GREEN 0xac +#define MAX_BLUE 0xc0 +#endif #ifdef BOARD_HOST /* For testing only */ #define MAX_RED 0xff diff --git a/common/lightbar.c b/common/lightbar.c index 879da25531..27749c5faf 100644 --- a/common/lightbar.c +++ b/common/lightbar.c @@ -133,6 +133,12 @@ static const struct lightbar_params_v1 default_params = { }, .s5_idx = 5, /* flash red */ .color = { +#if defined(BOARD_RYU) + {0x22, 0x17, 0x3b}, /* Segment0: Google blue */ + {0x3e, 0x10, 0x0c}, /* Segment1: Google red */ + {0x48, 0x3a, 0x0c}, /* Segment2: Google yellow */ + {0x1e, 0x2c, 0x1c}, /* Segment3: Google green */ +#else /* * These values have been optically calibrated for the * Samus LEDs to best match the official colors, described at @@ -143,6 +149,7 @@ static const struct lightbar_params_v1 default_params = { {0xbc, 0x50, 0x2c}, /* 1: Google red */ {0xd0, 0xe0, 0x00}, /* 2: Google yellow */ {0x50, 0xa0, 0x40}, /* 3: Google green */ +#endif /* These are primary colors */ {0x00, 0x00, 0xff}, /* 4: full blue */ {0xff, 0x00, 0x00}, /* 5: full red */ |