diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/config-gigabeat.h | 6 | ||||
-rw-r--r-- | firmware/powermgmt.c | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/firmware/export/config-gigabeat.h b/firmware/export/config-gigabeat.h index 3dbdadf621..a12322ef4c 100644 --- a/firmware/export/config-gigabeat.h +++ b/firmware/export/config-gigabeat.h | |||
@@ -65,7 +65,7 @@ | |||
65 | /* Define this if you have the WM8975 audio codec */ | 65 | /* Define this if you have the WM8975 audio codec */ |
66 | #define HAVE_WM8751 | 66 | #define HAVE_WM8751 |
67 | 67 | ||
68 | #define BATTERY_CAPACITY_DEFAULT 830 /* default battery capacity */ | 68 | #define BATTERY_CAPACITY_DEFAULT 2000 /* default battery capacity */ |
69 | 69 | ||
70 | #ifndef SIMULATOR | 70 | #ifndef SIMULATOR |
71 | 71 | ||
@@ -80,8 +80,8 @@ | |||
80 | 80 | ||
81 | /* Type of mobile power - check this out */ | 81 | /* Type of mobile power - check this out */ |
82 | #define CONFIG_BATTERY BATT_LIION830 /* could change this later */ | 82 | #define CONFIG_BATTERY BATT_LIION830 /* could change this later */ |
83 | #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ | 83 | #define BATTERY_CAPACITY_MIN 1500 /* min. capacity selectable */ |
84 | #define BATTERY_CAPACITY_MAX 850 /* max. capacity selectable */ | 84 | #define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ |
85 | #define BATTERY_CAPACITY_INC 25 /* capacity increment */ | 85 | #define BATTERY_CAPACITY_INC 25 /* capacity increment */ |
86 | #define BATTERY_TYPES_COUNT 1 /* only one type */ | 86 | #define BATTERY_TYPES_COUNT 1 /* only one type */ |
87 | 87 | ||
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 27d22cdaf0..2fef005b84 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c | |||
@@ -192,7 +192,7 @@ static const unsigned int battery_level_dangerous[BATTERY_TYPES_COUNT] = | |||
192 | #elif CONFIG_BATTERY == BATT_LIPOL1300 /* iRiver H1x0: LiPolymer */ | 192 | #elif CONFIG_BATTERY == BATT_LIPOL1300 /* iRiver H1x0: LiPolymer */ |
193 | 338 | 193 | 338 |
194 | #elif CONFIG_BATTERY == BATT_LIION830 /* Gigabeat F */ | 194 | #elif CONFIG_BATTERY == BATT_LIION830 /* Gigabeat F */ |
195 | 340 | 195 | 345 |
196 | #elif CONFIG_BATTERY == BATT_IAUDIO_X5 /* iAudio X5 */ | 196 | #elif CONFIG_BATTERY == BATT_IAUDIO_X5 /* iAudio X5 */ |
197 | 354 | 197 | 354 |
198 | #elif CONFIG_BATTERY == BATT_LPCS355385 /* iriver H10 20GB: LiPolymer*/ | 198 | #elif CONFIG_BATTERY == BATT_LPCS355385 /* iriver H10 20GB: LiPolymer*/ |
@@ -213,7 +213,7 @@ static const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = | |||
213 | #elif CONFIG_BATTERY == BATT_LIPOL1300 /* iRiver Hxxx */ | 213 | #elif CONFIG_BATTERY == BATT_LIPOL1300 /* iRiver Hxxx */ |
214 | 302 | 214 | 302 |
215 | #elif CONFIG_BATTERY == BATT_LIION830 /* Gigabeat F */ | 215 | #elif CONFIG_BATTERY == BATT_LIION830 /* Gigabeat F */ |
216 | 338 | 216 | 340 |
217 | #elif CONFIG_BATTERY == BATT_IAUDIO_X5 /* iAudio X5 */ | 217 | #elif CONFIG_BATTERY == BATT_IAUDIO_X5 /* iAudio X5 */ |
218 | 350 | 218 | 350 |
219 | #elif CONFIG_BATTERY == BATT_LPCS355385 /* iriver H10 20GB */ | 219 | #elif CONFIG_BATTERY == BATT_LPCS355385 /* iriver H10 20GB */ |
@@ -258,7 +258,7 @@ static const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = | |||
258 | { 103, 118, 121, 123, 124, 125, 126, 127, 128, 129, 135 } /* NiMH */ | 258 | { 103, 118, 121, 123, 124, 125, 126, 127, 128, 129, 135 } /* NiMH */ |
259 | #elif CONFIG_BATTERY == BATT_LIION830 | 259 | #elif CONFIG_BATTERY == BATT_LIION830 |
260 | /* Toshiba Gigabeat Li Ion 830mAH figured from discharge curve */ | 260 | /* Toshiba Gigabeat Li Ion 830mAH figured from discharge curve */ |
261 | { 342, 358, 361, 368, 371, 374, 377, 381, 387, 390, 397 } | 261 | { 354, 357, 359, 361, 364, 366, 372, 381, 377, 381, 394 }, |
262 | #else /* NiMH */ | 262 | #else /* NiMH */ |
263 | /* original values were taken directly after charging, but it should show | 263 | /* original values were taken directly after charging, but it should show |
264 | 100% after turning off the device for some hours, too */ | 264 | 100% after turning off the device for some hours, too */ |
@@ -279,7 +279,7 @@ static const unsigned short percent_to_volt_charge[11] = | |||
279 | 354, 386, 393, 398, 400, 402, 404, 408, 413, 418, 423 /* LiPo */ | 279 | 354, 386, 393, 398, 400, 402, 404, 408, 413, 418, 423 /* LiPo */ |
280 | #elif CONFIG_BATTERY == BATT_LIION830 | 280 | #elif CONFIG_BATTERY == BATT_LIION830 |
281 | /* Toshiba Gigabeat Li Ion 830mAH */ | 281 | /* Toshiba Gigabeat Li Ion 830mAH */ |
282 | 347, 363, 366, 373, 376, 379, 382, 386, 393, 403, 411 | 282 | 354, 357, 359, 361, 364, 366, 372, 381, 377, 381, 394 |
283 | #elif CONFIG_BATTERY == BATT_LPCS355385 | 283 | #elif CONFIG_BATTERY == BATT_LPCS355385 |
284 | /* iriver H10 20GB */ | 284 | /* iriver H10 20GB */ |
285 | 399, 403, 406, 408, 410, 412, 415, 418, 422, 426, 431 | 285 | 399, 403, 406, 408, 410, 412, 415, 418, 422, 426, 431 |
@@ -862,7 +862,7 @@ static void power_thread_sleep(int ticks) | |||
862 | * battery_centivolts is the centivolt-scaled filtered battery value. | 862 | * battery_centivolts is the centivolt-scaled filtered battery value. |
863 | */ | 863 | */ |
864 | battery_centivolts = (avgbat / BATT_AVE_SAMPLES + 5000) / 10000; | 864 | battery_centivolts = (avgbat / BATT_AVE_SAMPLES + 5000) / 10000; |
865 | 865 | ||
866 | /* update battery status every time an update is available */ | 866 | /* update battery status every time an update is available */ |
867 | battery_status_update(); | 867 | battery_status_update(); |
868 | } | 868 | } |
@@ -876,7 +876,7 @@ static void power_thread_sleep(int ticks) | |||
876 | 876 | ||
877 | /* update battery status every time an update is available */ | 877 | /* update battery status every time an update is available */ |
878 | battery_status_update(); | 878 | battery_status_update(); |
879 | 879 | ||
880 | #if (CONFIG_BATTERY!=BATT_4AA_NIMH) && (CONFIG_BATTERY!=BATT_3AAA)&& \ | 880 | #if (CONFIG_BATTERY!=BATT_4AA_NIMH) && (CONFIG_BATTERY!=BATT_3AAA)&& \ |
881 | (CONFIG_BATTERY!=BATT_1AA) | 881 | (CONFIG_BATTERY!=BATT_1AA) |
882 | if (!shutdown_timeout && | 882 | if (!shutdown_timeout && |
@@ -1346,7 +1346,7 @@ void shutdown_hw(void) | |||
1346 | audiohw_close(); | 1346 | audiohw_close(); |
1347 | #endif | 1347 | #endif |
1348 | /* If HD is still active we try to wait for spindown, otherwise the | 1348 | /* If HD is still active we try to wait for spindown, otherwise the |
1349 | shutdown_timeout in power_thread_sleep will force a power off */ | 1349 | shutdown_timeout in power_thread_sleep will force a power off */ |
1350 | while(ata_disk_is_active()) | 1350 | while(ata_disk_is_active()) |
1351 | sleep(HZ/10); | 1351 | sleep(HZ/10); |
1352 | #ifndef IAUDIO_X5 | 1352 | #ifndef IAUDIO_X5 |
@@ -1355,7 +1355,7 @@ void shutdown_hw(void) | |||
1355 | #ifdef HAVE_REMOTE_LCD | 1355 | #ifdef HAVE_REMOTE_LCD |
1356 | lcd_remote_set_contrast(0); | 1356 | lcd_remote_set_contrast(0); |
1357 | #endif | 1357 | #endif |
1358 | 1358 | ||
1359 | /* Small delay to make sure all HW gets time to flush. Especially | 1359 | /* Small delay to make sure all HW gets time to flush. Especially |
1360 | eeprom chips are quite slow and might be still writing the last | 1360 | eeprom chips are quite slow and might be still writing the last |
1361 | byte. */ | 1361 | byte. */ |