User's Guide

II-VI Incorporated
375 Saxonburg Boulevard
Saxonburg, PA 16056
T. 724.352.4455 | F. 724.352.5284 | www.ii-vi.com
3
Read Power
int OCCReadPWR(int i_i_pdNum, float
*o_f_pwrVal)
typedef enum {
PD_1577=0, PD_1550,
PD_1270, PD_4, PD_NONE
} E_PDNUM;
XMF-H EEPROM should be
flashed with OCC
calibration values. If it is
not, API will provide
uncalibrated Power value
and return value will
indicate Error.
6.1.5 Battery Management Library Usage
1. User needs to include the header file <battery_management.h> of the library into the
application source code.
2. User needs to initialize the library by calling the BatteryManagementInit() function.
[Once Init is successful, multiple APIs can be called before deinit.]
3. Call the relevant API from following list in Battery management Interface Table to perform
operation on Power management I2C interface.
4. De-initialize the library by calling the BatteryManagementDeInit().
5. Link the library while compiling the application by -lbatterymanagement.
Battery management Interface Table:
Sr
No.
Command
API
Remarks
1
Init - Custom API
int BatteryAPIInit(void)
2
DeInit - Custom API
int BatteryAPIDeInit(void)
3
Get Battery Charger
Temperature
int GetBatteryChargerTemp(float *o_f_temp)
Temperature in C
4
Get Battery Voltage
int GetBatteryVoltage(float *o_f_voltage)
Battery voltage in Volts
5
Get Battery Current
int GetBatteryCurrent(float *o_f_current)
Battery current in A
6
Get Battery Charge
Percentage
int GetBatteryChargePercentage(float
*o_f_chargePercentage)
Predicted remaining battery
capacity as a percentage of
FullChargeCapacity
7
Get Battery Charge Voltage
int GetBatteryChargerVoltage(float
*o_f_chargeVoltage)
Charging voltage in Volts