diff options
author | Bill Richardson <wfrichar@chromium.org> | 2012-04-06 23:10:19 -0700 |
---|---|---|
committer | Bill Richardson <wfrichar@chromium.org> | 2012-04-12 13:40:09 -0700 |
commit | d86ad9916547a3323be8da987ca8a19980a97743 (patch) | |
tree | 353d19590e33c88f59c48c1f78e4e0e075f735a3 /include/lightbar.h | |
parent | 20fdc57a351998f4a43731249f57bb262d610f72 (diff) | |
download | chrome-ec-d86ad9916547a3323be8da987ca8a19980a97743.tar.gz |
Add preliminary lightbar functionality.
I need to clean up the console commands and provide the same functionality
via ectool, but this is a good starting point.
BUG=chrome-os-partner:7839
TEST=manual
Power up the CPU. The lights should blink.
Change-Id: Ic05a171d2b647551f1cfc7d6b2fd101088cac137
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'include/lightbar.h')
-rw-r--r-- | include/lightbar.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/lightbar.h b/include/lightbar.h new file mode 100644 index 0000000000..37f8980a34 --- /dev/null +++ b/include/lightbar.h @@ -0,0 +1,32 @@ +/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* Ask the EC to set the lightbar state to reflect the CPU activity */ + +#ifndef __CROS_EC_LIGHTBAR_H +#define __CROS_EC_LIGHTBAR_H + +enum lightbar_sequence { + LIGHTBAR_NULL = 0, /* not used */ + /* CPU states */ + LIGHTBAR_S5, /* 1 */ + LIGHTBAR_S3, /* 2 */ + LIGHTBAR_S0, /* 3 */ + /* CPU state transitions */ + LIGHTBAR_S5S3, /* 4 */ + LIGHTBAR_S3S0, /* 5 */ + LIGHTBAR_S0S3, /* 6 */ + LIGHTBAR_S3S5, /* 7 */ + /* extra patterns */ + LIGHTBAR_TEST, /* 8 */ + LIGHTBAR_PULSE, /* 9 */ + /* that's all */ + LIGHTBAR_NUM_SEQUENCES +}; + +/* Request a preset sequence from the lightbar task. */ +void lightbar_sequence(enum lightbar_sequence s); + +#endif /* __CROS_EC_LIGHTBAR_H */ |