SRD Standelone programmation box: BQ27510DRZRG2.c Source File

| SRD Standelone programmation box 2.0 (16/11/15 10:00:00) Documentation of the SRD standelone programmation box

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Enumerations Enumerator Macros Pages
BQ27510DRZRG2.c
Go to the documentation of this file.
1 /*############################################################################################*/
2 /*############################################################################################*/
3 /**
4 * \file BQ27510DRZRG2.c
5 * \author Thibaut LALUQUE 3D-Ouest
6 * \date 05/11/2014
7 * \version 1.0
8 * \brief Source file for Battery Management BQ27510DRZR-G2 driver.
9 * \details All Right Reserved.
10 */
11 /*############################################################################################*/
12 /*############################################################################################*/
13
14
15 /*############################################################################################*/
16 /*## INCLUDES ################################################################################*/
17 /*############################################################################################*/
18 #include "BQ27510DRZRG2.h"
19 /*############################################################################################*/
20 /*## END INCLUDES ############################################################################*/
21 /*############################################################################################*/
22
23 /*############################################################################################*/
24 /*## CONFIGURATION BITS ######################################################################*/
25 /*############################################################################################*/
26
27 /*############################################################################################*/
28 /*## END CONFIGURATION BITS ##################################################################*/
29 /*############################################################################################*/
30
31 /*############################################################################################*/
32 /*## LOCAL DEFINES ###########################################################################*/
33 /*############################################################################################*/
34
35
36 /*############################################################################################*/
37 /*## END LOCAL DEFINES ######################################################################*/
38 /*############################################################################################*/
39
40
41 /*############################################################################################*/
42 /*## LOCAL FONCTIONS DECLARATION #############################################################*/
43 /*############################################################################################*/
44
45 /*############################################################################################*/
46 /*## END LOCAL FONCTIONS DECLARATION #########################################################*/
47 /*############################################################################################*/
48
49
50 /*############################################################################################*/
51 /*## LOCAL VARIABLES #########################################################################*/
52 /*############################################################################################*/
53
54 /*############################################################################################*/
55 /*## END LOCAL VARIABLES #####################################################################*/
56 /*############################################################################################*/
57
58 /*############################################################################################*/
59 /*## GLOBAL VARIABLES ########################################################################*/
60 /*############################################################################################*/
61 tBQBatteryStatus BQBatteryStatus;
62 /*############################################################################################*/
63 /*## END GLOBAL VARIABLES ####################################################################*/
64 /*############################################################################################*/
65
66
67 /*############################################################################################*/
68 /*## LOCAL FONCTIONS #########################################################################*/
69 /*############################################################################################*/
70
71 /*############################################################################################*/
72 /*## END LOCAL FONCTIONS #####################################################################*/
73 /*############################################################################################*/
74
75
76 /*############################################################################################*/
77 /*## EXTERNAL FONCTIONS ######################################################################*/
78 /*############################################################################################*/
79 void BQ27510DRZRG2_Init (void) {
80
81 I2C0Init(); //Init I2C
82 I2C0Enable(); //Enable I2C
83 }
84
85 signed short BQ_batteryIsConnected (void) {
86 unsigned char data; //Dummy
87 signed char result = I2C0Send(BQ_DEVICE_ADDRESS,&data,0);
88 return result; //Return 0 if battery is connected else return -1
89 }
90
91
92 signed short BQ_getCellTemperature(void) {
93 signed char result = 0;
94 unsigned char data[2] = {0};
95 unsigned char command;
96
97 command = BQ_TEMPERATURE_CMD;
98
99 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
100
101 if (result == -1) {
102 return -273; //Error
103 } else {
104 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
105 return (value/10) - 273; //Convert °K to °C
106 }
107 }
108
109
110 unsigned short BQ_getCellVoltage(void) {
111
112 signed char result = 0;
113 unsigned char data[2] = {0};
114 unsigned char command;
115
116 command = BQ_VOLTAGE_CMD;
117
118 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
119
120 if (result == -1) {
121 return 0; //Error
122 } else {
123
124 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
125
126 return value;
127 }
128 }
129
130 unsigned short BQ_getNominalAvailableCapacity(void) {
131 signed char result = 0;
132 unsigned char data[2] = {0};
133 unsigned char command;
134
135 command = BQ_NOMI_AVAILABLE_CAPACITY_CMD;
136
137 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
138
139 if (result == -1) {
140 return 0; //Error
141 } else {
142
143 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
144
145 return value;
146 }
147 }
148
149
150 unsigned short BQ_getFullAvailableCapacity (void) {
151 signed char result = 0;
152 unsigned char data[2] = {0};
153 unsigned char command;
154
155 command = BQ_FULL_AVAILABLE_CAPACITY_CMD;
156
157 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
158
159 if (result == -1) {
160 return 0; //Error
161 } else {
162
163 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
164
165 return value;
166 }
167 }
168
169
170 unsigned short BQ_getRemainingCapacity (void) {
171 signed char result = 0;
172 unsigned char data[2] = {0};
173 unsigned char command;
174
175 command = BQ_REMAINING_CAPACITY_CMD;
176
177 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
178
179 if (result == -1) {
180 return 0; //Error
181 } else {
182
183 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
184
185 return value;
186 }
187 }
188
189 unsigned short BQ_getFullChargeCapacity (void) {
190 signed char result = 0;
191 unsigned char data[2] = {0};
192 unsigned char command;
193
194 command = BQ_FULL_CHARGE_CAPACITY_CMD;
195
196 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
197
198 if (result == -1) {
199 return 0; //Error
200 } else {
201
202 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
203
204 return value;
205 }
206 }
207
208 signed short BQ_getAverageCurrent (void) {
209 signed char result = 0;
210 unsigned char data[2] = {0};
211 unsigned char command;
212
213 command = BQ_AVERAGE_CURRENT_CMD;
214
215 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
216
217 if (result == -1) {
218 return 0; //Error
219 } else {
220
221 signed short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
222
223 return value;
224 }
225 }
226
227 unsigned short BQ_getTimeToEmpty (void) {
228 signed char result = 0;
229 unsigned char data[2] = {0};
230 unsigned char command;
231
232 command = BQ_TIME_TO_EMPTY_CMD;
233
234 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
235
236 if (result == -1) {
237 return 0; //Error
238 } else {
239
240 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
241
242 return value;
243 }
244 }
245
246 unsigned short BQ_getTimeToFull (void) {
247 signed char result = 0;
248 unsigned char data[2] = {0};
249 unsigned char command;
250
251 command = BQ_TIME_TO_FULL_CMD;
252
253 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
254
255 if (result == -1) {
256 return 0; //Error
257 } else {
258
259 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
260
261 return value;
262 }
263 }
264
265 signed short BQ_getStandbyCurrent (void) {
266 signed char result = 0;
267 unsigned char data[2] = {0};
268 unsigned char command;
269
270 command = BQ_STANDBY_CURRENT_CMD;
271
272 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
273
274 if (result == -1) {
275 return 0; //Error
276 } else {
277
278 signed short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
279
280 return value;
281 }
282 }
283
284 unsigned short BQ_getStandbyTimeToEmpty (void) {
285 signed char result = 0;
286 unsigned char data[2] = {0};
287 unsigned char command;
288
289 command = BQ_STANDBY_TIME_TO_EMPTY_CMD;
290
291 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
292
293 if (result == -1) {
294 return 0; //Error
295 } else {
296
297 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
298
299 return value;
300 }
301 }
302
303 signed short BQ_getMaxLoadCurrent (void) {
304 signed char result = 0;
305 unsigned char data[2] = {0};
306 unsigned char command;
307
308 command = BQ_MAX_LOAD_CURRENT_CMD;
309
310 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
311
312 if (result == -1) {
313 return 0; //Error
314 } else {
315
316 signed short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
317
318 return value;
319 }
320 }
321
322 unsigned short BQ_getMaxLoadTimeToEmpty (void) {
323 signed char result = 0;
324 unsigned char data[2] = {0};
325 unsigned char command;
326
327 command = BQ_MAX_LOAD_TIME_TO_EMPTY_CMD;
328
329 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
330
331 if (result == -1) {
332 return 0; //Error
333 } else {
334
335 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
336
337 return value;
338 }
339 }
340
341 unsigned long BQ_getAvailableEnergy (void) {
342 signed char result = 0;
343 unsigned char data[2] = {0};
344 unsigned char command;
345
346 command = BQ_AVAILABLE_ENERGY_CMD;
347
348 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
349
350 if (result == -1) {
351 return 0; //Error
352 } else {
353
354 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
355
356 return value*10;
357 }
358 }
359
360 signed short BQ_getAveragePower (void) {
361 signed char result = 0;
362 unsigned char data[2] = {0};
363 unsigned char command;
364
365 command = BQ_AVERAGE_POWER_CMD;
366
367 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
368
369 if (result == -1) {
370 return 0; //Error
371 } else {
372
373 signed short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
374
375 return value;
376 }
377 }
378
379 unsigned short BQ_getTTEAtConstantPower (void) {
380 signed char result = 0;
381 unsigned char data[2] = {0};
382 unsigned char command;
383
384 command = BQ_TTEAT_CONSTANT_POWER_CMD;
385
386 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
387
388 if (result == -1) {
389 return 0; //Error
390 } else {
391
392 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
393
394 return value;
395 }
396 }
397
398 unsigned short BQ_getCycleCount (void) {
399 signed char result = 0;
400 unsigned char data[2] = {0};
401 unsigned char command;
402
403 command = BQ_CYCLE_COUNTE_CMD;
404
405 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
406
407 if (result == -1) {
408 return 0; //Error
409 } else {
410
411 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
412
413 return value;
414 }
415 }
416
417 unsigned short BQ_getStateOfCharge (void) {
418 signed char result = 0;
419 unsigned char data[2] = {0};
420 unsigned char command;
421
422 command = BQ_STATE_OF_CHARGE_CMD;
423
424 result = I2C0Read(BQ_DEVICE_ADDRESS, &command, 1, data, 2);
425
426 if (result == -1) {
427 return 0; //Error
428 } else {
429 unsigned short value = (((unsigned short)data[1]) << 8 ) | ((unsigned short)data[0]);
430 return value; //Convert °K to °C
431 }
432 }
433
434 signed short BQ_getFullInfo (void) {
435
436 if(BQ_batteryIsConnected() == 0) {
437
438 BQBatteryStatus.cellTemperature = BQ_getCellTemperature();
439 BQBatteryStatus.cellVoltage = BQ_getCellVoltage();
440 BQBatteryStatus.noLoadNominalCapacity = BQ_getNominalAvailableCapacity();
441 BQBatteryStatus.noLoadFullCapacity = BQ_getFullAvailableCapacity();
442 BQBatteryStatus.remainingCapacity = BQ_getRemainingCapacity();
443 BQBatteryStatus.fullCapacity = BQ_getFullChargeCapacity();
444 BQBatteryStatus.averageCurrent = BQ_getAverageCurrent();
445 BQBatteryStatus.timeToEmpty = BQ_getTimeToEmpty();
446 BQBatteryStatus.timeToFull = BQ_getTimeToFull();
447 BQBatteryStatus.standbyCurrent = BQ_getTimeToFull();
448 BQBatteryStatus.standbyTimeToEmpty = BQ_getStandbyTimeToEmpty();
449 BQBatteryStatus.maxLoadCurrent = BQ_getMaxLoadCurrent();
450 BQBatteryStatus.maxLoadTimeToEmpty = BQ_getMaxLoadTimeToEmpty();
451 BQBatteryStatus.availableEnergy = BQ_getAvailableEnergy();
452 BQBatteryStatus.averagePower = BQ_getAveragePower();
453 BQBatteryStatus.timeToEmptyAtConstantPower = BQ_getTTEAtConstantPower();
454 BQBatteryStatus.cycleCount = BQ_getCycleCount();
455 BQBatteryStatus.stateOfCharge = BQ_getStateOfCharge();
456
457 return 0;
458
459 } else {
460
461 //No battery detected
462 BQBatteryStatus.cellTemperature = 0;
463 BQBatteryStatus.cellVoltage = 0;
464 BQBatteryStatus.noLoadNominalCapacity = 0;
465 BQBatteryStatus.noLoadFullCapacity = 0;
466 BQBatteryStatus.remainingCapacity = 0;
467 BQBatteryStatus.fullCapacity = 0;
468 BQBatteryStatus.averageCurrent = 0;
469 BQBatteryStatus.timeToEmpty = 0;
470 BQBatteryStatus.timeToFull = 0;
471 BQBatteryStatus.standbyCurrent = 0;
472 BQBatteryStatus.standbyTimeToEmpty = 0;
473 BQBatteryStatus.maxLoadCurrent = 0;
474 BQBatteryStatus.maxLoadTimeToEmpty = 0;
475 BQBatteryStatus.availableEnergy = 0;
476 BQBatteryStatus.averagePower = 0;
477 BQBatteryStatus.timeToEmptyAtConstantPower = 0;
478 BQBatteryStatus.cycleCount = 0;
479 BQBatteryStatus.stateOfCharge = 0;
480
481 return -1;
482 }
483 }
484 /*############################################################################################*/
485 /*## END EXTERNAL FONCTIONS ##################################################################*/
486 /*############################################################################################*/
tBQBatteryStatus::remainingCapacity
unsigned short remainingCapacity
Definition: BQ27510DRZRG2.h:94
BQ_MAX_LOAD_CURRENT_CMD
#define BQ_MAX_LOAD_CURRENT_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:64
BQ_getTTEAtConstantPower
unsigned short BQ_getTTEAtConstantPower(void)
Definition: BQ27510DRZRG2.c:379
tBQBatteryStatus::cycleCount
unsigned short cycleCount
Definition: BQ27510DRZRG2.h:106
BQ_STANDBY_TIME_TO_EMPTY_CMD
#define BQ_STANDBY_TIME_TO_EMPTY_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:63
BQ_getMaxLoadCurrent
signed short BQ_getMaxLoadCurrent(void)
Definition: BQ27510DRZRG2.c:303
tBQBatteryStatus::maxLoadTimeToEmpty
unsigned short maxLoadTimeToEmpty
Definition: BQ27510DRZRG2.h:102
BQ_getCellTemperature
signed short BQ_getCellTemperature(void)
Function used to get some information about the cell monitoring.
Definition: BQ27510DRZRG2.c:92
BQ_NOMI_AVAILABLE_CAPACITY_CMD
#define BQ_NOMI_AVAILABLE_CAPACITY_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:55
BQ_FULL_AVAILABLE_CAPACITY_CMD
#define BQ_FULL_AVAILABLE_CAPACITY_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:56
tBQBatteryStatus::timeToEmptyAtConstantPower
unsigned short timeToEmptyAtConstantPower
Definition: BQ27510DRZRG2.h:105
BQ_REMAINING_CAPACITY_CMD
#define BQ_REMAINING_CAPACITY_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:57
I2C0Send
signed char I2C0Send(unsigned char address, unsigned char *data, unsigned char dataLength)
Send a packet on the I2C interface.
Definition: i2c0.c:131
tBQBatteryStatus
Struct used to store informations about the cell monitoring.
Definition: BQ27510DRZRG2.h:89
I2C0Init
void I2C0Init(void)
Initialized the I2C0 module with the defined parameters.
Definition: i2c0.c:95
tBQBatteryStatus::averagePower
signed short averagePower
Definition: BQ27510DRZRG2.h:104
tBQBatteryStatus::averageCurrent
signed short averageCurrent
Definition: BQ27510DRZRG2.h:96
BQ_getFullInfo
signed short BQ_getFullInfo(void)
Function used to get all information about the cell monitoring.
Definition: BQ27510DRZRG2.c:434
tBQBatteryStatus::timeToFull
unsigned short timeToFull
Definition: BQ27510DRZRG2.h:98
BQ_MAX_LOAD_TIME_TO_EMPTY_CMD
#define BQ_MAX_LOAD_TIME_TO_EMPTY_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:65
BQ27510DRZRG2_Init
void BQ27510DRZRG2_Init(void)
Function used to initialize the BQ device and it's DSP peripheral.
Definition: BQ27510DRZRG2.c:79
BQ_FULL_CHARGE_CAPACITY_CMD
#define BQ_FULL_CHARGE_CAPACITY_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:58
BQ_AVERAGE_CURRENT_CMD
#define BQ_AVERAGE_CURRENT_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:59
BQ_TIME_TO_FULL_CMD
#define BQ_TIME_TO_FULL_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:61
tBQBatteryStatus::noLoadFullCapacity
unsigned short noLoadFullCapacity
Definition: BQ27510DRZRG2.h:93
tBQBatteryStatus::fullCapacity
unsigned short fullCapacity
Definition: BQ27510DRZRG2.h:95
I2C0Read
signed char I2C0Read(unsigned char address, unsigned char *preambule, unsigned char preambuleLength, unsigned char *data, unsigned char dataLength)
Read a packet on the I2C interface.
Definition: i2c0.c:183
BQ_AVAILABLE_ENERGY_CMD
#define BQ_AVAILABLE_ENERGY_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:66
BQ_batteryIsConnected
signed short BQ_batteryIsConnected(void)
Function used to know if a battery is connected or not.
Definition: BQ27510DRZRG2.c:85
BQ_getRemainingCapacity
unsigned short BQ_getRemainingCapacity(void)
Definition: BQ27510DRZRG2.c:170
BQ_STATE_OF_CHARGE_CMD
#define BQ_STATE_OF_CHARGE_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:70
tBQBatteryStatus::cellTemperature
signed short cellTemperature
Definition: BQ27510DRZRG2.h:90
BQ_getStateOfCharge
unsigned short BQ_getStateOfCharge(void)
Definition: BQ27510DRZRG2.c:417
BQ_getNominalAvailableCapacity
unsigned short BQ_getNominalAvailableCapacity(void)
Definition: BQ27510DRZRG2.c:130
tBQBatteryStatus::availableEnergy
unsigned long availableEnergy
Definition: BQ27510DRZRG2.h:103
BQ_TEMPERATURE_CMD
#define BQ_TEMPERATURE_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:52
BQ_getTimeToFull
unsigned short BQ_getTimeToFull(void)
Definition: BQ27510DRZRG2.c:246
BQ_TTEAT_CONSTANT_POWER_CMD
#define BQ_TTEAT_CONSTANT_POWER_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:68
BQ_STANDBY_CURRENT_CMD
#define BQ_STANDBY_CURRENT_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:62
BQ_getCycleCount
unsigned short BQ_getCycleCount(void)
Definition: BQ27510DRZRG2.c:398
BQ_getTimeToEmpty
unsigned short BQ_getTimeToEmpty(void)
Definition: BQ27510DRZRG2.c:227
BQ_getAvailableEnergy
unsigned long BQ_getAvailableEnergy(void)
Definition: BQ27510DRZRG2.c:341
BQBatteryStatus
tBQBatteryStatus BQBatteryStatus
Variable used to store informations about the cell monitoring.
Definition: BQ27510DRZRG2.c:61
tBQBatteryStatus::maxLoadCurrent
signed short maxLoadCurrent
Definition: BQ27510DRZRG2.h:101
BQ_getStandbyCurrent
signed short BQ_getStandbyCurrent(void)
Definition: BQ27510DRZRG2.c:265
BQ_getStandbyTimeToEmpty
unsigned short BQ_getStandbyTimeToEmpty(void)
Definition: BQ27510DRZRG2.c:284
tBQBatteryStatus::stateOfCharge
unsigned short stateOfCharge
Definition: BQ27510DRZRG2.h:107
I2C0Enable
#define I2C0Enable()
Set/Clear/Read the enable status of the I2C0 module.
Definition: i2c0.h:124
BQ_CYCLE_COUNTE_CMD
#define BQ_CYCLE_COUNTE_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:69
BQ_VOLTAGE_CMD
#define BQ_VOLTAGE_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:53
BQ_getMaxLoadTimeToEmpty
unsigned short BQ_getMaxLoadTimeToEmpty(void)
Definition: BQ27510DRZRG2.c:322
BQ_AVERAGE_POWER_CMD
#define BQ_AVERAGE_POWER_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:67
tBQBatteryStatus::standbyTimeToEmpty
unsigned short standbyTimeToEmpty
Definition: BQ27510DRZRG2.h:100
BQ_DEVICE_ADDRESS
#define BQ_DEVICE_ADDRESS
Define the I2C BQ address.
Definition: BQ27510DRZRG2.h:42
BQ_getFullChargeCapacity
unsigned short BQ_getFullChargeCapacity(void)
Definition: BQ27510DRZRG2.c:189
BQ_getCellVoltage
unsigned short BQ_getCellVoltage(void)
Definition: BQ27510DRZRG2.c:110
BQ_getAveragePower
signed short BQ_getAveragePower(void)
Definition: BQ27510DRZRG2.c:360
BQ_getFullAvailableCapacity
unsigned short BQ_getFullAvailableCapacity(void)
Definition: BQ27510DRZRG2.c:150
tBQBatteryStatus::standbyCurrent
signed short standbyCurrent
Definition: BQ27510DRZRG2.h:99
BQ27510DRZRG2.h
Headerfile for Battery Management BQ27510DRZR-G2 driver.
tBQBatteryStatus::noLoadNominalCapacity
unsigned short noLoadNominalCapacity
Definition: BQ27510DRZRG2.h:92
tBQBatteryStatus::timeToEmpty
unsigned short timeToEmpty
Definition: BQ27510DRZRG2.h:97
tBQBatteryStatus::cellVoltage
unsigned short cellVoltage
Definition: BQ27510DRZRG2.h:91
BQ_getAverageCurrent
signed short BQ_getAverageCurrent(void)
Definition: BQ27510DRZRG2.c:208
BQ_TIME_TO_EMPTY_CMD
#define BQ_TIME_TO_EMPTY_CMD
Define the command of the BQ device.
Definition: BQ27510DRZRG2.h:60