资源简介
高通平台msm8096上用bq27541电量计驱动,已经在我们项目上调通。有需要的朋友可以下载下来看看。亲测可用
代码片段和文件信息
/*
* BQ27x00 battery driver
*
* Copyright (C) 2008 Rodolfo Giometti
* Copyright (C) 2008 Eurotech S.p.A.
* Copyright (C) 2010-2011 Lars-Peter Clausen tafoo.de>
* Copyright (C) 2011 Pali Rohár
*
* based on a previous work by Copyright (C) 2008 Texas Instruments Inc.
*
* This package is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* THIS PACKAGE IS PROVIDED ‘‘AS IS‘‘ AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES INCLUDING WITHOUT LIMITATION THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
*/
/*
* Datasheets:
* http://focus.ti.com/docs/prod/folders/print/bq27000.html
* http://focus.ti.com/docs/prod/folders/print/BQ27541.html
* http://www.ti.com/product/bq27425-g1
* http://www.ti.com/product/BQ27742-G1
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define DRIVER_VERSION “1.2.0“
#define BQ27x00_REG_TEMP 0x06
#define BQ27x00_REG_VOLT 0x08
#define BQ27x00_REG_AI 0x14
#define BQ27x00_REG_FLAGS 0x0A
#define BQ27x00_REG_TTE 0x16
#define BQ27x00_REG_TTF 0x18
#define BQ27x00_REG_TTECP 0x26
#define BQ27x00_REG_NAC 0x0C /* Nominal available capacity */
#define BQ27x00_REG_LMD 0x12 /* Last measured discharge */
#define BQ27x00_REG_CYCT 0x2A /* Cycle count total */
#define BQ27x00_REG_AE 0x22 /* Available energy */
#define BQ27x00_POWER_AVG 0x24
#define BQ27000_REG_RSOC 0x0B /* Relative State-of-Charge */
#define BQ27000_REG_ILMD 0x76 /* Initial last measured discharge */
#define BQ27000_FLAG_EDVF BIT(0) /* Final End-of-Discharge-Voltage flag */
#define BQ27000_FLAG_EDV1 BIT(1) /* First End-of-Discharge-Voltage flag */
#define BQ27000_FLAG_CI BIT(4) /* Capacity Inaccurate flag */
#define BQ27000_FLAG_FC BIT(5)
#define BQ27000_FLAG_CHGS BIT(7) /* Charge state flag */
#define BQ27541_REG_SOC 0x2C
#define BQ27541_REG_DCAP 0x3C /* Design capacity */
#define BQ27541_FLAG_DSC BIT(0)
#define BQ27541_FLAG_SOCF BIT(1) /* State-of-Charge threshold final */
#define BQ27541_FLAG_SOC1 BIT(2) /* State-of-Charge threshold 1 */
#define BQ27541_FLAG_FC BIT(9)
#define BQ27541_FLAG_OTC BIT(15)
#define BQ27742_POWER_AVG 0x76
/* bq27425 register addresses are same as bq27x00 addresses minus 4 */
#define BQ27425_REG_OFFSET 0x04
#define BQ27425_REG_SOC 0x18 /* Register address plus offset */
#define BQ27000_RS 20 /* Resistor sense */
#define BQ27x00_POWER_CONSTANT (256 * 29200 / 1000)
struct bq27x00_device_info;
struct bq27x00_access_methods {
int (*read)(struct
相关资源
- 高通CPU救砖工具刷入完整资料
- 高通骁龙820芯片手册
- 电子-GravityI2C3.7V锂电池电量计stm32L1
- 高通量实时荧光定量PCR方法筛选FL细胞
- Qualcomm HS USB Driver
- 高通HS-USB驱动
- 论文研究 - 使用嵌入式固体浓度时间
- 高通平台camera驱动调试
- 高通9x07 软件架构及用户指导 mdm9x07
- 高通校准综测工具QSPR快速指南
- 高通AT命令文档
- 高通 atheros ART 校准
- qca wifi-10.2源代码用户手册
- 高通IPQ4018/IPQ4028/IPQ4019/IPQ4029芯片软件
- 高通手机刷机9008工具
- 高通 C-V2X PPT资料
- 用于无线充电系统的发射电力控制-
- QDLoader HS-USB Driver_64bit_Setup.zip
- 高通平台最新学习资料
- 高通ipq4018?4019开发资料
- 高通手机驱动 高通9008驱动万能版
- 高通写号工具QualcommTool-eMMC-v3.2.zip
- QCA9563_高通原厂原理图
- 高通QCA9531 芯片资料
- 高通C-V2X方案介绍
- 高通QCA8337N 7口1000M交换芯片包含光口
- 高通平台QFIL使用手册
- 高通QCA9531阅读文档
- 高通CSR蓝牙芯片资料QCC3006DATASHEET
- 高通QFIL刷机工具
评论
共有 条评论