Files
OpenCellular/include/lightbar_msg_list.h
Bill Richardson f7ae0fb81b Add display-battery-level function to lightbar
This adds a new lightbar sequence (TAP), which temporarily displays the
battery level. It pulses if the system is charging.

BUG=chrome-os-partner:29041
BRANCH=ToT
TEST=manual

From the EC console, run

  lightbar seq tap

The lightbar should change temporarily.

Then run

  lightbar demo on

and press the Up, Down, Left, and Right keys to fake the battery charge
level (up & down) and the AC present state (left & right). Run the

  lightbar seq tap

command periodically to watch it change.

Change-Id: I84ff928d93060f7ef7d46d608732d37cf5185aff
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/202964
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2014-06-07 06:01:00 +00:00

24 lines
759 B
C

/* 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.
*
* This defines a list of lightbar messages. It's done in this odd way so that
* we can automatically derive the correct constants, functions, and message
* types.
*/
#define LIGHTBAR_MSG_LIST \
LBMSG(ERROR), /* 0 */ \
LBMSG(S5), /* 1 */ \
LBMSG(S3), /* 2 */ \
LBMSG(S0), /* 3 */ \
LBMSG(S5S3), /* 4 */ \
LBMSG(S3S0), /* 5 */ \
LBMSG(S0S3), /* 6 */ \
LBMSG(S3S5), /* 7 */ \
LBMSG(STOP), /* 8 */ \
LBMSG(RUN), /* 9 */ \
LBMSG(PULSE), /* A */ \
LBMSG(TEST), /* B */ \
LBMSG(KONAMI), /* C */ \
LBMSG(TAP), /* D */