summaryrefslogtreecommitdiff
path: root/include/battery.h
blob: 9f3cb4cad71bebd1e47a3b1bd2541694e5c88e44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* 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
/* Precharge only when state of charge is below this level */
#define PRE_CHARGE_THRESHOLD 25

/* Define the lightbar color thresholds */
#define LIGHTBAR_POWER_THRESHOLD_FULL   99
#define LIGHTBAR_POWER_THRESHOLD_HIGH   40
#define LIGHTBAR_POWER_THRESHOLD_MEDIUM 10
/* LOW is anything below MEDIUM */

#endif /* __CROS_EC_BATTERY_H */