summaryrefslogtreecommitdiff
path: root/firmware/export/powermgmt.h
AgeCommit message (Collapse)Author
2008-02-10Commit FS#8379 by Andree Buschmann. Disables much of the remaining unneeded ↵Michael Giacomelli
hardware on PP50xx targets (Ipods, Sansa, H10s, etc) resulting in a large savings in power and consequent increase in battery life. Results vary from target to target and from codec to codec, but we now approach the OF runtime on several PP devices. For now, leave base CPU clock at 30MHz, although further savings is possible with some codecs if clock is reduced. Additionally, fix battery capacity on c200 and use my measurements to improve runtime estimation for Sandisk targets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16259 a1c6a512-1295-4272-9138-f99709370657
2007-11-14Accept FS#8139 - Correct assumed current consumption for iPod VideoJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15614 a1c6a512-1295-4272-9138-f99709370657
2007-11-01Lets use the measurements Toni took months ago for the Sansa battery, ↵Michael Giacomelli
instead of the using the Archos ones. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15389 a1c6a512-1295-4272-9138-f99709370657
2007-08-17First step of powermanagement rework: * Move target specific stuff into ↵Jens Arnold
target tree, starting with battery voltage tables and voltage reading. (This revealed some incorrect percent_to_voltage_charging mappings). * Voltage reading on 1st gen ipods is now correct. * Clean up obsolete config #defines. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14375 a1c6a512-1295-4272-9138-f99709370657
2007-08-15Switch to using millivolt for battery voltage and other internal voltages. * ↵Jens Arnold
Fix debug voltage history display. * Some code cleanup. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14364 a1c6a512-1295-4272-9138-f99709370657
2007-08-12Enable a lot more features for simulators and add stubs where necessary, ↵Nils Wallménius
simulators should now work with identical lng and voice files as the respective target git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14299 a1c6a512-1295-4272-9138-f99709370657
2007-07-14Correction for ipod video and nano battery type. FS #7216 by Andree BuschmannPeter D'Hoye
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13885 a1c6a512-1295-4272-9138-f99709370657
2007-06-29Shutdown and powermanagement cleanup: * Use the proper function for ↵Jens Arnold
determining whether the battery level is safe, and get rid of the extra one. Low battery warning now appears at 10% or less. * Don't delay shutdown artificially by 3 seconds due to low/critical battery warning. * Shutdown at critical battery level: Skip all disk-hitting housekeeping, make sure dircache stops, and don't mark disk as clean in eeprom. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13734 a1c6a512-1295-4272-9138-f99709370657
2007-05-15Make it possible to select the correct battery capacity on ipod video, ↵Nils Wallménius
default is the 30GB models 400mAh, discharge curve and runtime estimation is still no calibrated. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13395 a1c6a512-1295-4272-9138-f99709370657
2006-11-11Improved power management (FS#3001). Shutdown rockbox when the battery gets ↵Barry Wardell
to a level where the device doesn't function properly. Calculate remaining charging time while charging (rather than remaining running time). Show "Low Battery" and "Battery Empty" warnings. Also fixes FS#4786. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11507 a1c6a512-1295-4272-9138-f99709370657
2006-10-30General: changed local adc to voltage conversions in several places to use ↵Michael Sevakis
battery_voltage. Added battery_read_info function for unfiltered battery information. x5: removed adc_read as a distinct function. Removed adc tick task. adc_init is empty inline. Adjusted battery scale, voltage to level array and read 10 bits from the ADC for battery since 255 levels is not enough for true centivolt resolution. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11396 a1c6a512-1295-4272-9138-f99709370657
2006-06-06Work-in-progress rework of charging status reading & display: * Changed ↵Jens Arnold
several charging related HAVE_* macros into one multi-value CONFIG_CHARGING. * Always use proper macros for charging states. * Battery symbol charging animation now starts from current level on all targets with charging. Two-colour animation kept for non-b&w targets. Round down fill level while charging as before, but round to nearest pixel value for discharging on all targets. * Charging anim fixed on player. * Some code cleanup. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10080 a1c6a512-1295-4272-9138-f99709370657
2006-04-16Commit tagcache in background when possible (at least dircache enabled).Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9686 a1c6a512-1295-4272-9138-f99709370657
2006-04-15Move the battery min/max capacity to player config files and add an ↵Zakk Roberts
increment setting (amount of mAh to increase/decrease by in the settings menu) for more precise battery value tweaking/limiting per-model. This allows the proper range for iAudio X5 - 950mAh, or 2250mAh for the X5L. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9678 a1c6a512-1295-4272-9138-f99709370657
2006-03-04Archos V1 recorder charging path #2927 by Alun ThomasJörg Hohensohn
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8898 a1c6a512-1295-4272-9138-f99709370657
2006-01-25New "battery benchmark" plugin by Alexander Spyridakis, modified a bit by meHristo Kovachev
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8451 a1c6a512-1295-4272-9138-f99709370657
2006-01-19Make sure that no targets lose charging related features from those red ↵Brandon Low
builds yesterday. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8389 a1c6a512-1295-4272-9138-f99709370657
2006-01-19Attempt fix to broken builds pt. 2Hristo Kovachev
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8385 a1c6a512-1295-4272-9138-f99709370657
2006-01-19Charging state reporting on H3x0Brandon Low
Don't read the GPIO every refresh of statusbar or gwps for plugged state, use a variable exported from powermgmt instead. Allow Custom WPS to access %bc for battery charge state on targets that support this. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8383 a1c6a512-1295-4272-9138-f99709370657
2005-09-14The power thread now monitors the shutdown process and forces a poweroff if ↵Linus Nielsen Feltzing
it takes more than 8 seconds. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7517 a1c6a512-1295-4272-9138-f99709370657
2005-07-09Wrong iriver model checkLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7083 a1c6a512-1295-4272-9138-f99709370657
2005-07-05More accurate runtime estimate calculation for iriver (still not veryMiika Pekkarinen
accurate with other than 128k mp3 files). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7021 a1c6a512-1295-4272-9138-f99709370657
2005-07-05New poweroff handling, using the SYS_POWEROFF event, allowing plugins to ↵Linus Nielsen Feltzing
save their settings before powering off. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7019 a1c6a512-1295-4272-9138-f99709370657
2005-05-04Proper 'battery level dangerous' handling for Ondio. Moved this info into an ↵Jens Arnold
array, and removed unused #defines. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6403 a1c6a512-1295-4272-9138-f99709370657
2005-04-06First lame attempt to show correct battery level on the iRiverLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6258 a1c6a512-1295-4272-9138-f99709370657
2005-03-23patch # 1159539 from GvB: V1 charging cleanupJörg Hohensohn
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6224 a1c6a512-1295-4272-9138-f99709370657
2005-03-03removed the practically useless "trickle charge" and "deep discharge" ↵Jörg Hohensohn
options, now trickle is always on and deep always off git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6107 a1c6a512-1295-4272-9138-f99709370657
2005-03-03More aggressive Recorder V1 charging (patch #1116884 from Jerry Van Baren)Jörg Hohensohn
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6105 a1c6a512-1295-4272-9138-f99709370657
2005-02-06clean shutdown for idle timer and sleep timerChristi Scarborough
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5814 a1c6a512-1295-4272-9138-f99709370657
2005-01-30New Ondio feature: Battery type setting, for correct battery level display.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5717 a1c6a512-1295-4272-9138-f99709370657
2004-10-25The battery level thresholds for Ondio were a bit optimisticJens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5341 a1c6a512-1295-4272-9138-f99709370657
2004-10-15Adjusted power thread to Ondio: no charging, no car adapter mode, different ↵Jens Arnold
current values for runtime estimation git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5286 a1c6a512-1295-4272-9138-f99709370657
2004-10-10more realistic limits for AAA cellsJörg Hohensohn
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5244 a1c6a512-1295-4272-9138-f99709370657
2004-10-10Consistent battery capacity handling for settings and menu, adapted allowed ↵Jens Arnold
range for Ondio git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5243 a1c6a512-1295-4272-9138-f99709370657
2004-10-08battery levels adjusted for OndioJörg Hohensohn
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5230 a1c6a512-1295-4272-9138-f99709370657
2004-10-08multiple battery types prepared (CONFIG_BATTERY)Jörg Hohensohn
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5227 a1c6a512-1295-4272-9138-f99709370657
2004-06-22Added reset_poweroff_timer(), which can be used to prevent idle poweroff. ↵Linus Nielsen Feltzing
This is also available in the plugin API. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4787 a1c6a512-1295-4272-9138-f99709370657
2004-03-16Increased the maximum battery capacityLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4388 a1c6a512-1295-4272-9138-f99709370657
2004-02-05Better charging feedback for FM/V2 devicesLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4296 a1c6a512-1295-4272-9138-f99709370657
2003-10-17Car Ignition Auto Stop (patch #736339 by Craig Sather)Björn Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3976 a1c6a512-1295-4272-9138-f99709370657
2003-08-25Slightly more correct initialization of the power/charging codeLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3940 a1c6a512-1295-4272-9138-f99709370657
2003-02-14Allow simulators to use battery constantsBjörn Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3262 a1c6a512-1295-4272-9138-f99709370657
2003-02-07Include File Cleanup And Move-Around Party 2003.Daniel Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3213 a1c6a512-1295-4272-9138-f99709370657