mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 01:50:53 +00:00
This adds an "extra/" directory to hold various experiments and optional programs. With this change, we add a tool that can simulate the lightbar behavior on the build machine. That can be used to experment with variations in the lightbar pattern code without needing to reflash a Pixel with a new EC to see the effect. There is no functional change to the EC code, just a couple of #ifdefs to allow common/lightbar.c to be compiled separately from the EC. BUG=none BRANCH=ToT TEST=make buildall -j cd extra make ./lightbar You may need to install the libxcb1-dev package on your build machine. Change-Id: I847ce7ea97cae792b1de1b91f488819e873b6555 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/199883
35 lines
1.0 KiB
C
35 lines
1.0 KiB
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.
|
|
*/
|
|
/* Ask the EC to set the lightbar state to reflect the CPU activity */
|
|
|
|
#ifndef __CROS_EC_LIGHTBAR_H
|
|
#define __CROS_EC_LIGHTBAR_H
|
|
|
|
/****************************************************************************/
|
|
/* Internal stuff */
|
|
|
|
/* Define the types of sequences */
|
|
#define LBMSG(state) LIGHTBAR_##state
|
|
#include "lightbar_msg_list.h"
|
|
enum lightbar_sequence {
|
|
LIGHTBAR_MSG_LIST
|
|
LIGHTBAR_NUM_SEQUENCES
|
|
};
|
|
#undef LBMSG
|
|
|
|
/* Request a preset sequence from the lightbar task. */
|
|
void lightbar_sequence(enum lightbar_sequence s);
|
|
|
|
/****************************************************************************/
|
|
/* External stuff */
|
|
|
|
/* These are used for demo purposes */
|
|
#define DEMO_MODE_DEFAULT 0
|
|
extern void demo_battery_level(int inc);
|
|
extern void demo_is_charging(int ischarge);
|
|
extern void demo_brightness(int inc);
|
|
|
|
#endif /* __CROS_EC_LIGHTBAR_H */
|