Chapter 3 Terminal Specific Function Library
99
3.10 Battery
This section describes the power management functions that can be used to monitor the
voltage level of the main and backup batteries.
The portable terminal is equipped with a main battery for normal operation, and, a backup
battery for keeping SRAM data, as well as for time accuracy.
charger_status
Purpose
To get the status of battery charging.
Syntax
int charger_status (void);
Example
if (charger_status == CHARGE_DONE)
puts ("Battery is full");
Description
This routine checks the charging progress of the main battery.
Return
The return value can be one of the following:
CHARGE_STANDBY
: Not connected to any external power.
CHARGING
: The battery is being charged now.
CHARGE_DONE
: The battery is fully charged.
CHARGE_FAIL
: Battery charging fails.
get_vmain
Purpose
To get the voltage level of the main battery.
Syntax
int get_vmain (void);
Example
if (get_vmain() < 2200) // alkaline battery
puts ("Battery is low");
Description
This routine reads the voltage level of the main battery, in units of mV.
Return
It returns the voltage reading (milli-volt).
See Also
get_vbackup
get_vbackup
Purpose
To get the voltage level of the backup battery.
Syntax
int get_vbackup (void);
Содержание Optimus R
Страница 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Страница 6: ......
Страница 8: ...2 C Programming Guide For Optimus S R...
Страница 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Страница 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Страница 24: ...18 C Programming Guide For Optimus S R...
Страница 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...
Страница 232: ...226 C Programming Guide For Optimus S R 4 11 Implementation defined Limits limits h float h Refer to limit h and float h...
Страница 238: ...232 C Programming Guide For Optimus S R...