
AIV-QM97V1FL Series User Manual
68
Acrosser Technology Co., Ltd.
Syntax:
i32 getBattValt(float *vol)
Description:
This function gets the battery voltage ant put it in the
memory which is pointed at by the pointer ‘vol’.
Parameters:
This function takes a pointer to a ‘float’ variable as the
parameter. The reading of the battery voltage is put at the
memory which is pointed at by the parameter ‘vol’.
Return Value:
If this function works successfully, it returns 0, any other
value standards for error.
Syntax:
i32 getBattMonitor(u8 *val)
Description:
The function gets the status of the Battery Monitor.
Parameters:
This function takes a pointer to an unsigned char variable
as the parameter. After calling this function, the status
of the Battery Monitor will be put at the memory which is
pointed by the parameter ‘val’. If the Battery Monitor is
enabled, ‘*val’ is 0x5A. If the Battery Monitor is disabled,
the ‘*val’ is 0xA5. Users can use the macros ‘ENABLED’
(0x5A) and ‘DISABLED’(0xA5) to test the status value
‘*val’.
Return Value:
If this function works successfully, it returns 0, any other
value standards for error.
Syntax:
i32 setBattMonitor(u8 val)
Description:
The function sets the status of the Battery Monitor.
Parameters:
This function takes an unsigned char as the parameter.
The value of this parameter can be ‘ENABLED’ (0x5A) or
‘DISABLED’(0xA5).
Return Value:
If this function works successfully, it returns 0, any other
value standards for error.
Syntax:
i32 getBattDelta(float *val)
Description:
This function gets the delta value. The delta value is the
maximum voltage deviation of the power from its nominal
voltage. If the function of Battery Monitor is ON, the Power
Subsystem shuts the system down when the voltage
deviation of the power is larger than the delta value.
Parameters:
This function takes a pointer to a float variable as the
parameter. The delta value will be put at the memory
which is pointed by the parameter ‘val’.
Return Value:
If this function works successfully, it returns 0, any other
value standards for error.