资源简介
高通平台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
相关资源
- HIS影像融合与高通滤波影像融合的代
- RaptorQ实现源代码
- 高通工具导入QCN方法
- ar8033 高通PHY芯片
- 高通磁盘模式ADB一键进入9008
- 高通功耗调试文档
- 高通射频IC面试题目
- 高通救黑砖8064_msimage.mbn MPRG8064.hex r
- DS2780 DS2784电量计参数计算.xlsx
- 高通MSM8625救黑砖MPRG8625.hex 8625_msima
- 基于multisim设计同相反相(高通低通)
- vuforia-unity-6-2-10 高通AR vuforia-unity
- 高通QcomDloader线刷工具刷机教程步骤说
- 高通平台充电介绍
- MSM8939器件规范
- 深度解析高通RF360移动射频前端解决方
- 高通电力猫PLC QCA6410 芯片资料(Data
- vuforia-sdk-uwp-7-2-20
- RN8302直流测试应用笔记_V1.1.pdf
- csr3020的原理图
- QXDM_3.9.19_免安装破解版
- 高通 PLC载波通讯QCA7500资料等
- 高通_MSM8937 Chipset Layout Guidelines
- Qualcomm_QHSUSB_driver
- 高通QcomDloader线刷工具刷机教程步骤说
- 高通HS-USB驱动 2.1.0.3,Qualcomm HS-USB D
- 高通驱动.zip
- fir滤波器实现,附低通、高通、带通
- 高通安卓LCD调试流程总结.docx
- 高通骁龙845芯片手册/datasheet资料
评论
共有 条评论