Commit graph

11 commits

Author SHA1 Message Date
Thomas Martitz
c1bd9b0361 Rework powermgmt to enable code re-use on appliation and sims.
* Introduce CONFIG_BATTERY_MEASURE define, to allow targets (application)
to break powermgmt.c's assumption about the ability to read battery voltage.
There's now additionally percentage (android) and remaining time measure
(maemo). No measure at all also works (sdl app). If voltage can't be measured,
then battery_level() is king and it'll be used for power_history and runtime
estimation.

* Implement target's API in the simulator, i.e. _battery_voltage(), so it
doesn't need to implement it's own powermgmt.c and other stubs. Now
the sim behaves much more like a native target, although it still
changes the simulated battery voltage quickly,

* Other changes include include renaming battery_adc_voltage() to
_battery_voltage(), for consistency with the new target functions and
making some of the apps code aware that voltage and runtime estimation
is not always available.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31548 a1c6a512-1295-4272-9138-f99709370657
2012-01-03 23:44:38 +00:00
Bertrik Sikken
82a2cdb2ad Various minor fixes for Samsung YH* targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27751 a1c6a512-1295-4272-9138-f99709370657
2010-08-08 09:02:41 +00:00
Rafaël Carré
45c7498f59 FS#11335 by me: make ARM assembly functions thumb-friendly
We can't pop into pc on ARMv4t when using thumb: the T bit won't be
modified if we are returning to a thumb function
Code running on ARMv4t should use the new ldrpc / ldmpc macros instead
of ldr pc, [sp], #4 and ldm(cond) sp!, {regs, pc}
No modification on pure ARM builds and ARMv5+

Note: USE_THUMB is currently never defined, no targets can currently be
built with -mthumb, see FS#6734

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26756 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 04:41:36 +00:00
Rafaël Carré
71db2d74b5 Samsung YH920 : fix lcd_blit_mono displaying twice too wide
lcd_write_data() wrote twice too much pixels to the controller
The fix is the same than r22885, vertically packed 2bpp displays use
8-bits fb_data while horizontally packed 2bpp use 16-bits fb_data

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22893 a1c6a512-1295-4272-9138-f99709370657
2009-10-03 13:56:23 +00:00
Rafaël Carré
fcc6a68c6e Samsung YH920 LCD
Remove unused lcd_mono_data
Replace a loop in partial update function by asm lcd_write_data()
Remove a variable only used in this loop (x) and rename x0 to x

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22888 a1c6a512-1295-4272-9138-f99709370657
2009-10-03 13:05:08 +00:00
Jens Arnold
840fb66bc9 Bugfix: On vertically packed 2bpp LCDs a grey pixel block is only 4 pixels, so don't process twice as much data as intended. This was the cause for the mpegplayer crashes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22885 a1c6a512-1295-4272-9138-f99709370657
2009-10-03 12:20:35 +00:00
Rafaël Carré
f690cfdb44 Forgotten in r22876 : remove (void)arg;
These arguments are now used

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22877 a1c6a512-1295-4272-9138-f99709370657
2009-10-02 19:14:14 +00:00
Rafaël Carré
c46b44f20b Samsung YH920 : greylib support based on ipod/lcd-as-gray.S
Demo plugins run fine, mpegplayer data aborts for yet unknown reasons

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22876 a1c6a512-1295-4272-9138-f99709370657
2009-10-02 17:51:05 +00:00
Mark Arigo
bcb3d52582 Fix display bug in the Samsung YH-920 on partial lcd updates.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22626 a1c6a512-1295-4272-9138-f99709370657
2009-09-05 00:46:49 +00:00
Rafaël Carré
f81cadad2a YH920 : enable battery reading (uncalibrated yet)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22592 a1c6a512-1295-4272-9138-f99709370657
2009-09-01 14:36:50 +00:00
Mark Arigo
758bb3bc62 3 new ports: Samsung YH-820, YH-920, and YH-925. Mostly functional. Audio working on 820 & 925 (untested on the 920). No battery readings. No recording. No plugins. Keymap needs work.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21083 a1c6a512-1295-4272-9138-f99709370657
2009-05-25 21:10:45 +00:00