diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-10-08 17:45:52 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-10-08 17:45:52 +0000 |
commit | 43079ea07f13a7631cd3c0e5993638235427a476 (patch) | |
tree | 13ff7f3370f2793797fe9bd51e4e459a5dda695f /firmware/powermgmt.c | |
parent | 5cf1c97aea10864ecb6c3836a5c17845a5906d79 (diff) | |
download | rockbox-43079ea07f13a7631cd3c0e5993638235427a476.tar.gz rockbox-43079ea07f13a7631cd3c0e5993638235427a476.zip |
multiple battery types prepared (CONFIG_BATTERY)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5227 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r-- | firmware/powermgmt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 155d11e609..e7486635d0 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c | |||
@@ -92,7 +92,7 @@ static const int poweroff_idle_timeout_value[15] = | |||
92 | static const int percent_to_volt_decharge[11] = | 92 | static const int percent_to_volt_decharge[11] = |
93 | /* voltages (centivolt) of 0%, 10%, ... 100% when charging disabled */ | 93 | /* voltages (centivolt) of 0%, 10%, ... 100% when charging disabled */ |
94 | { | 94 | { |
95 | #ifdef HAVE_LIION | 95 | #if CONFIG_BATTERY == BATT_LIION2200 |
96 | /* measured values */ | 96 | /* measured values */ |
97 | 260, 285, 295, 303, 311, 320, 330, 345, 360, 380, 400 | 97 | 260, 285, 295, 303, 311, 320, 330, 345, 360, 380, 400 |
98 | #else /* NiMH */ | 98 | #else /* NiMH */ |
@@ -112,7 +112,7 @@ void set_battery_capacity(int capacity) | |||
112 | battery_capacity = 1500; | 112 | battery_capacity = 1500; |
113 | } | 113 | } |
114 | 114 | ||
115 | #if defined(HAVE_CHARGE_CTRL) || defined(HAVE_LIION) | 115 | #if defined(HAVE_CHARGE_CTRL) || CONFIG_BATTERY == BATT_LIION2200 |
116 | int charge_state = 0; /* at the beginning, the | 116 | int charge_state = 0; /* at the beginning, the |
117 | charger does nothing */ | 117 | charger does nothing */ |
118 | #endif | 118 | #endif |
@@ -443,7 +443,7 @@ static void power_thread(void) | |||
443 | int i; | 443 | int i; |
444 | int avg, ok_samples, spin_samples; | 444 | int avg, ok_samples, spin_samples; |
445 | int current = 0; | 445 | int current = 0; |
446 | #ifdef HAVE_LIION | 446 | #if CONFIG_BATTERY == BATT_LIION2200 |
447 | int charging_current; | 447 | int charging_current; |
448 | #endif | 448 | #endif |
449 | #ifdef HAVE_CHARGE_CTRL | 449 | #ifdef HAVE_CHARGE_CTRL |
@@ -535,7 +535,7 @@ static void power_thread(void) | |||
535 | #endif /* MEM == 8 */ | 535 | #endif /* MEM == 8 */ |
536 | #endif /* HAVE_CHARGE_CONTROL */ | 536 | #endif /* HAVE_CHARGE_CONTROL */ |
537 | 537 | ||
538 | #ifdef HAVE_LIION | 538 | #if CONFIG_BATTERY == BATT_LIION2200 |
539 | /* We use the information from the ADC_EXT_POWER ADC channel, which | 539 | /* We use the information from the ADC_EXT_POWER ADC channel, which |
540 | tells us the charging current from the LTC1734. When DC is | 540 | tells us the charging current from the LTC1734. When DC is |
541 | connected (either via the external adapter, or via USB), we try | 541 | connected (either via the external adapter, or via USB), we try |
@@ -790,7 +790,7 @@ static void power_thread(void) | |||
790 | powermgmt_last_cycle_startstop_min++; | 790 | powermgmt_last_cycle_startstop_min++; |
791 | 791 | ||
792 | #endif /* HAVE_CHARGE_CTRL*/ | 792 | #endif /* HAVE_CHARGE_CTRL*/ |
793 | #endif /* HAVE_LIION */ | 793 | #endif /* # if CONFIG_BATTERY == BATT_LIION2200 */ |
794 | 794 | ||
795 | /* sleep for roughly a minute */ | 795 | /* sleep for roughly a minute */ |
796 | #ifdef HAVE_CHARGE_CTRL | 796 | #ifdef HAVE_CHARGE_CTRL |