Files
OpenCellular/include/battery.h
Bill Richardson 97131838e8 Implement something close to final lightbar code.
BUG=chrome-os-partner:8039
TEST=manual

Boot the system, look at the lightbar. It should pulse colors slowly on
battery, faster on AC.

Change-Id: I0184973d11eda51db87d652aa2c92995f5a25588
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27810
2012-07-23 14:15:47 -07:00

31 lines
875 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.
*
* Battery charging parameters and constraints
*/
#ifndef __CROS_EC_BATTERY_H
#define __CROS_EC_BATTERY_H
/* Design capacities, percentage */
#define BATTERY_LEVEL_WARNING 15
#define BATTERY_LEVEL_LOW 10
#define BATTERY_LEVEL_CRITICAL 5
#define BATTERY_LEVEL_SHUTDOWN 3
/* Stop charge when state of charge reaches this percentage */
#define STOP_CHARGE_THRESHOLD 100
/* Threshold for power led to turn green */
#define POWERLED_GREEN_THRESHOLD 90
/* Define the lightbar thresholds, as though we care. */
#define LIGHTBAR_POWER_THRESHOLD_BLUE 90
#define LIGHTBAR_POWER_THRESHOLD_GREEN 40
#define LIGHTBAR_POWER_THRESHOLD_YELLOW 10
/* Red below 10% */
#endif /* __CROS_EC_BATTERY_H */