summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-05-27 16:14:28 +0800
committerChromeBot <chrome-bot@google.com>2013-05-28 12:53:51 -0700
commit87d8f8e5b1ced8647640eef710088d453d0f0e33 (patch)
tree2af7b6bdf6ec8b3e88471de07198baa9f8c86e8f /include/ec_commands.h
parent99e3fc93e697d646925972790060805e72e39da5 (diff)
downloadchrome-ec-87d8f8e5b1ced8647640eef710088d453d0f0e33.tar.gz
Add ectool command to control LED color
This provides a way to control LED color with ectool. We can either set the color or switch back to automatic control. BUG=chrome-os-partner:19745 TEST=ectool led red -> LED turns red. ectool led green -> LED turns green. Unplug charger -> LED turns off. ectool led green -> LED turns of and shows green. ectool led auto -> LED back to normal. BRANCH=spring Change-Id: I0b455f34cea448660fe44a5fecaac1cb084f8144 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/56721 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 4f226f7abf..d4a88f510b 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -723,6 +723,20 @@ enum lightbar_command {
};
/*****************************************************************************/
+/* LED control commands */
+
+#define EC_CMD_LED_SET 0x29
+
+#define EC_LED_FLAGS_AUTO (1 << 1)
+
+struct ec_params_led_set {
+ uint8_t r;
+ uint8_t g;
+ uint8_t b; /* Used as yellow if there is no blue LED */
+ uint8_t flags;
+} __packed;
+
+/*****************************************************************************/
/* Verified boot commands */
/*