Commit graph

7 commits

Author SHA1 Message Date
Thomas Jarosch
5f5a83e1c9 maemo: Clean up unused variables
Change-Id: I5fbb0b0cc56fa565499345844464d1c94ff3ba1a
2015-01-11 17:45:56 +01:00
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
Thomas Jarosch
5c73e34d2d Bring idle poweroff to RaaA and the sim
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29543 a1c6a512-1295-4272-9138-f99709370657
2011-03-08 19:33:30 +00:00
Thomas Jarosch
acd8bffb95 Expose sys_poweroff() and cancel_shutdown() to RaaA. Hopefully fixes android build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29485 a1c6a512-1295-4272-9138-f99709370657
2011-03-01 20:31:20 +00:00
Thomas Martitz
d8f6c75ab9 Hopefully get shutdown/exit handling on SDL/maemo right.
Make shutdown_hw() not return as it's supposed to, ensure sim_do_exit() is called from main thread and move sim_kernel_shutdown() into it to simplify things.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29455 a1c6a512-1295-4272-9138-f99709370657
2011-02-28 03:24:48 +00:00
Thomas Jarosch
258626f455 Fix the shutdown sequence for maemo, SDL and simulator builds
Do proper shutdown in RaaA builds like writeout of
last.FM scrobbler file and other neat things.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29309 a1c6a512-1295-4272-9138-f99709370657
2011-02-15 19:43:04 +00:00
Thomas Jarosch
5f037ac015 Initial maemo platform support
Adds Nokia N900, N810 and N800 support.

Features:
- Introduce maemo specific platform defines
- Play audio in silent mode
- Stop playback on incoming calls
- Battery level readout
- Bluetooth headset support
- Save CPU by disabling screen updates if the display
  is off or the app doesn't have input focus
- N900: GStreamer audio backend

Kudos to kugel for the code review.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29248 a1c6a512-1295-4272-9138-f99709370657
2011-02-08 20:05:25 +00:00