bq27541.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*****************************************************************************
  2. *
  3. * Filename:
  4. * ---------
  5. * bq27541.h
  6. *
  7. * Project:
  8. * --------
  9. * Android
  10. *
  11. * Description:
  12. * ------------
  13. * bq27541 header file
  14. *
  15. * Author:
  16. * -------
  17. *
  18. ****************************************************************************/
  19. #ifndef _bq27541_SW_H_
  20. #define _bq27541_SW_H_
  21. /**********************************************************
  22. *
  23. * [MASK/SHIFT]
  24. *
  25. *********************************************************/
  26. #define BQ27541_CMD_AtRate 0x02
  27. #define BQ27541_CMD_AtRateTimeToEmpty 0x04
  28. #define BQ27541_CMD_Temperature 0x06
  29. #define BQ27541_CMD_Voltage 0x08
  30. #define BQ27541_CMD_Flags 0x0A
  31. #define BQ27541_CMD_NominalAvailableCapacity 0x0C
  32. #define BQ27541_CMD_FullAvailableCapacity 0x0E
  33. #define BQ27541_CMD_RemainingCapacity 0x10
  34. #define BQ27541_CMD_FullChargeCapacity 0x12
  35. #define BQ27541_CMD_AverageCurrent 0x14
  36. #define BQ27541_CMD_TimeToEmpty 0x16
  37. #define BQ27541_CMD_TimeToFull 0x18
  38. #define BQ27541_CMD_StandbyCurrent 0x1A
  39. #define BQ27541_CMD_StandbyTimeToEmpty 0x1C
  40. #define BQ27541_CMD_MaxLoadCurrent 0x1E
  41. #define BQ27541_CMD_MaxLoadTimeToEmpty 0x20
  42. #define BQ27541_CMD_AvailableEnergy 0x22
  43. #define BQ27541_CMD_AveragePower 0x24
  44. #define BQ27541_CMD_TimeToEmptyAtConstantPower 0x26
  45. #define BQ27541_CMD_Internal_Temp 0x28
  46. #define BQ27541_CMD_CycleCount 0x2A
  47. #define BQ27541_CMD_StateOfCharge 0x2C
  48. #define BQ27541_CMD_StateOfHealth 0x2E
  49. #define BQ27541_CMD_PassedCharge 0x34
  50. #define BQ27541_CMD_DOD0 0x36
  51. /**********************************************************
  52. *
  53. * [Extern Function]
  54. *
  55. *********************************************************/
  56. extern U32 bq27541_set_cmd_read(U8 cmd, int *returnData);
  57. #endif // _bq27541_SW_H_