mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 08:31:52 +00:00
define CONFIG_CMD_BATDEBUG to enable console commands. If the battery is larger than 6Ah or smaller than 150mAh, scale the parameters transparently to the user using macros. BUG=chrome-os-partner:34477 BRANCH=none TEST=Custom console commands for the fuel gauge I also used a Logic16 from Saleae and the fuel gauge on hadoken. Signed-off-by: Myles Watson <mylesgw@chromium.org> Change-Id: I959d51c3188336e4ad0983528ad7e53a2955a764 Reviewed-on: https://chromium-review.googlesource.com/234285 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Myles Watson <mylesgw@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Myles Watson <mylesgw@chromium.org>
20 lines
490 B
C
20 lines
490 B
C
/* Copyright (c) 2014 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 driver for BQ27621-G1
|
|
*/
|
|
|
|
/* Sets percent to the battery life as a percentage (0-100)
|
|
*
|
|
* Returns EC_SUCCESS on success.
|
|
*/
|
|
int bq27621_state_of_charge(int *percent);
|
|
|
|
/* Initializes the fuel gauge with the constants for the battery.
|
|
*
|
|
* Returns EC_SUCCESS on success.
|
|
*/
|
|
int bq27621_init(void);
|
|
|