Commit graph

160 commits

Author SHA1 Message Date
Michael Sparmann
c599da333e Commit FS#11663 by me - Patch: iPod Nano 2G Bootloader: Boot OF if MENU button is held
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28237 a1c6a512-1295-4272-9138-f99709370657
2010-10-10 20:52:46 +00:00
Andree Buschmann
274c84fae9 Disable clickwheel power supply when hold button is active for iPod nano 2G.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28161 a1c6a512-1295-4272-9138-f99709370657
2010-09-25 21:41:10 +00:00
Rafaël Carré
66f8fb52a9 */app.lds: remove STUBOFFSET
This is related to gdb, and gdb can only work on SH and ifp
This was mistakenly kept when app.lds was forked for each SoC
Side-effect: fix DEBUG builds when the rockbox binary is expected to
be loaded at the start of DRAM and there is no runtime relocation

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28124 a1c6a512-1295-4272-9138-f99709370657
2010-09-20 17:09:55 +00:00
Frank Gevaerts
a1cf4ced83 Unify 32mb and 64mb ipod video builds - FS#11580
Since memory on 32mb ipod videos is mapped twice, a 64mb build still has codecs and plugins mapped in a usable area. This means that all that needs to be done to support 32mb and 64mb boards with the same build is to adjust audiobufend to avoid using more than the actually present RAM.



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27960 a1c6a512-1295-4272-9138-f99709370657
2010-08-31 19:06:04 +00:00
Marcin Bukat
8d5f159687 Implement WHEEL_ACCELERATION for Ipod mini 1G based on code for 1G/2G.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27865 a1c6a512-1295-4272-9138-f99709370657
2010-08-23 19:56:17 +00:00
Jens Arnold
0a080891e7 iPod 1st Gen: Fix battery ADC not working due to the EABI compiler optimizing the delay loops away. Use udelay() instead, not wasting CPU time when the CPU is not boosted.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27850 a1c6a512-1295-4272-9138-f99709370657
2010-08-20 22:21:07 +00:00
Jens Arnold
43ccc1eef7 Enable wheel acceleration and repeats for iPod 1st/2nd Gen, using the same settings as on iPod 3rd Gen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27849 a1c6a512-1295-4272-9138-f99709370657
2010-08-20 21:00:15 +00:00
Bertrik Sikken
c9a3419b9e Add #include to power-ipod.c, make some variables static in storage.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27634 a1c6a512-1295-4272-9138-f99709370657
2010-07-31 10:59:22 +00:00
Michael Sevakis
bd380b3993 iPod 3G: Ensure wheel repeats are not generated unless the same keycode is posted more than once in a row, regardless of velocity. Remove 'was_hold' from handle_scroll_wheel calls since the call is never reachable with was_hold being true. Just clear pending ints in one spot after setting levels. Init prev_scroll properly again in 3g case.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27025 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 18:47:42 +00:00
Michael Sevakis
910101d613 iPod 3G: Add a small check to ensure backlight never gets stuck off if wheel is inactive for too long (because it limits the number of backlight_on calls).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26964 a1c6a512-1295-4272-9138-f99709370657
2010-06-19 20:36:54 +00:00
Michael Sevakis
b7a8935dff iPod 3G: Implement wheel acceleration and repeats. Chosen settings feel pretty decent but can be tweaked.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26962 a1c6a512-1295-4272-9138-f99709370657
2010-06-19 20:09:37 +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
Jens Arnold
fe0334394f Fix byte order for Mini G2, and fix comments.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26675 a1c6a512-1295-4272-9138-f99709370657
2010-06-07 21:16:59 +00:00
Jens Arnold
a225ee9867 Use atomic GPIO manipulation where appropriate.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26632 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 13:50:26 +00:00
Torne Wuff
4a2cab6aa1 USB charging support for iPods.
This adds proper full speed charging support for iPod 4G, Color, Mini 1G, Mini 2G, Nano 1G, and Video. Nano 2G already has support, so now all ipods charge (except 1G-3G whose hardware doesn't support USB charging).

USB charging defaults to on, but will only charge at full speed from a USB host. To charge from an AC charger, you need to set the USB charging mode to "force". It may be possible to detect AC chargers in a future version, at least on some models.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26626 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 13:01:19 +00:00
Jens Arnold
57dcfe0eee Implement backlight brightness for iPod G4 greyscale and iPod Color/Photo.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26573 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 11:48:12 +00:00
Jens Arnold
7a1aca46a3 Smaller & faster grey blitting on greyscale ipods, based on an idea by Mike Sevakis. ISR speedup on all greyscale iPods except Mini 2nd Gen is ~10%. No speedup on the latter, because the serial transfer is the limiting factor.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26422 a1c6a512-1295-4272-9138-f99709370657
2010-05-30 22:24:50 +00:00
Torne Wuff
2960052d28 Increaase default ipod 3g contrast, to a value between the last two.
It seems there is some significant variance between different greyscale ipods of the same model, so it's unlikely that *any* value will be great for everyone. I'm hoping that this is just high enough that the lightest screens aren't totally blank, but not dark enough that the darkest screens are entirely unreadably black ;)

This rather unsatisfactory compromise is to help us get a new bootloader release out (since bootloaders can't have their contrast adjusted) - a real fix would be to detect the LCD type, which the OF appears to be able to do (maybe).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26208 a1c6a512-1295-4272-9138-f99709370657
2010-05-20 18:58:33 +00:00
Andree Buschmann
7d21e5ab32 No need to use alternating registers for dual register read/write sequence. Correct comment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25939 a1c6a512-1295-4272-9138-f99709370657
2010-05-10 20:35:57 +00:00
Andree Buschmann
18b5488a4a Minor speed up (+3%) of iPod Video screen updates.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25938 a1c6a512-1295-4272-9138-f99709370657
2010-05-10 19:12:03 +00:00
Thomas Martitz
50a6ca39ad Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00
Torne Wuff
5b4a84a4ce FS#11149: alternative fix for ipod startup/shutdown issue
Instead of using the OF's low-battery handler to force a shutdown which appears to have numerous unwanted side effects, just clear the end of IRAM before shutting down which appears to solve the original "ipod sometimes needs hard reset to turn on" issue.

If you experience the "need hard reset" issue after this commit, please let us know. It has been tested on several models but we still don't know for sure what the original problem was. ;)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25772 a1c6a512-1295-4272-9138-f99709370657
2010-05-02 09:41:28 +00:00
Andree Buschmann
1eabe8042a Tweaking iPod Video battery configuration. Dangerous battery level is latest reached below 3500 mV, discharge curve is optimized for stable runtime estimation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25600 a1c6a512-1295-4272-9138-f99709370657
2010-04-11 22:12:02 +00:00
Andree Buschmann
f6cecfd91b Minor binsize savings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25588 a1c6a512-1295-4272-9138-f99709370657
2010-04-11 12:33:02 +00:00
Andree Buschmann
18e7c1f4af Use atomic operation for GPIOx_ENABLEs in ide_power_enable() for iPod Video. Thanks to Jens Arnold for this one.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25273 a1c6a512-1295-4272-9138-f99709370657
2010-03-21 13:50:38 +00:00
Andree Buschmann
b6c12a129e Submit FS#11065. Introduce a new system setting for en-/disabling the Line-out. For now only implemented on iPod Video. This allows to save power if the user does not use the player's Line-out. On iPod 5G the saving is ~0.5 mA.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25257 a1c6a512-1295-4272-9138-f99709370657
2010-03-20 15:02:29 +00:00
Andree Buschmann
abce1b9927 Submit FS#9746 by Boris Gjenero. Set PP502x IDE pins low for iPod Video when IDE power is off. Done by OF the same way, might be used by other targets as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25255 a1c6a512-1295-4272-9138-f99709370657
2010-03-20 12:30:18 +00:00
Thomas Martitz
02660557ad Fix a bunch of boot.lds files so that they build with newer ld. The stack/bss sections need NOLOAD. otherwise the linker would try to include those into the binary. I don't know why this ever worked with our current ld version.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25078 a1c6a512-1295-4272-9138-f99709370657
2010-03-08 23:16:57 +00:00
Andree Buschmann
7901505dc3 Higher responsiveness for iPod clickwheel acceleration.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25047 a1c6a512-1295-4272-9138-f99709370657
2010-03-06 15:53:45 +00:00
Thomas Martitz
617ff557e8 Fix remaining reds. I forgot to change the app.lds of the other PP targets (it's the same file as for e200/c200 though).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25016 a1c6a512-1295-4272-9138-f99709370657
2010-03-03 23:48:51 +00:00
Michael Giacomelli
aea6dd036c Commit FS#11034 by Andrew Engelbrecht. Fixes default contrast value on ipod 3G.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24742 a1c6a512-1295-4272-9138-f99709370657
2010-02-18 04:21:15 +00:00
Andree Buschmann
909e4c6c06 Add iPod 3G and iPod Color/Photo (FS#9072) current consumption and battery discharge curves to allow reasonable runtime estimation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24709 a1c6a512-1295-4272-9138-f99709370657
2010-02-16 22:53:54 +00:00
Torne Wuff
d4bfc15232 FS#10107: work around the issue on some ipods where after shutdown they do not power on.
Some ipods do not power on correctly after being shut down and require a hard
reset before they work again. This workaround shuts the device down via the OF
which prevents the problem from occurring. There is a cosmetic effect: the low
battery symbol appears briefly on power of.

Change applies to PP502x ipods: 4G/photo/video/mini1g/mini2g/nano1g

Patch by Boris Gjenero (dreamlayers), manual changes by me.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24207 a1c6a512-1295-4272-9138-f99709370657
2010-01-09 19:04:51 +00:00
Torne Wuff
2d0af6f3c7 FS#9728: Battery current measuring on the Video iPod
Patch by Boris Gjenero. Displays the current flowing into or out of the
battery on the ipodvideo. Other ipods do not appear to have this ADC channel
connected.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23500 a1c6a512-1295-4272-9138-f99709370657
2009-11-03 20:35:04 +00:00
Michael Sparmann
4a63ac7c00 Add iPod Nano 2G µsec timer, and use it in the clickwheel driver.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23309 a1c6a512-1295-4272-9138-f99709370657
2009-10-21 18:53:41 +00:00
Thomas Martitz
d85c3ec410 Convert lcd_activation callbacks to use the event system to allow for multiple parallel callbacks (for custom statusbar).
Increase maximum event count as we need more (I actually had a report about it during custom statusbar testing).
Removed corresponding functions from the core and plugin api. Bump min version and sort.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23302 a1c6a512-1295-4272-9138-f99709370657
2009-10-20 21:54:59 +00:00
Bertrik Sikken
d24d885aa4 Use wrap-safe TIME_BEFORE/TIME_AFTER macros to compare times with current_time, instead of comparing them directly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23246 a1c6a512-1295-4272-9138-f99709370657
2009-10-18 15:50:30 +00:00
Michael Sparmann
5a4ce22b77 Fix the iPod Nano 2G clickwheel when releasing the hold switch
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23122 a1c6a512-1295-4272-9138-f99709370657
2009-10-12 00:12:02 +00:00
Dave Chapman
3c362fa8c6 Nano2G - implement "Pause on headphone unplug" feature
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23072 a1c6a512-1295-4272-9138-f99709370657
2009-10-10 15:37:05 +00:00
Dave Chapman
f5feb13cc5 Unify the button driver for the Nano 2G with the driver for earlier clickwheel ipods. The clickwheel hardware appears to be the same - the differences are just related to the hardware init and how the data is read.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22878 a1c6a512-1295-4272-9138-f99709370657
2009-10-02 23:04:30 +00:00
Dave Chapman
75e301dabb Fix a comment so that it matches the code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22718 a1c6a512-1295-4272-9138-f99709370657
2009-09-17 08:24:59 +00:00
Nils Wallménius
47608e06b3 fix red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22432 a1c6a512-1295-4272-9138-f99709370657
2009-08-19 22:15:45 +00:00
Bertrik Sikken
d767883a41 Various files: make functions static if they're local or make sure there is a proper #include if not
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22184 a1c6a512-1295-4272-9138-f99709370657
2009-08-06 09:28:25 +00:00
Jonathan Gordon
d10f9511cf Fix FS#5230 - reinit the opto-i2c after disabling hold so the buttons work again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22078 a1c6a512-1295-4272-9138-f99709370657
2009-07-29 01:57:48 +00:00
Jens Arnold
47d4c4739b ARM asm LCD and ATA driver functions: Don't save r12 as it is a scratch reg. Saves a bit of stack and execution time.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21795 a1c6a512-1295-4272-9138-f99709370657
2009-07-11 23:43:44 +00:00
Bertrik Sikken
0023943439 Fix duplicate #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20977 a1c6a512-1295-4272-9138-f99709370657
2009-05-17 14:50:19 +00:00
Boris Gjenero
7e3f8e0c08 Remove workaround for FS#10130 from 5G iPod LCD sleep code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20806 a1c6a512-1295-4272-9138-f99709370657
2009-04-26 18:51:14 +00:00
Bertrik Sikken
dccdce6c3c Remove unnecessary #include "adc.h"
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20791 a1c6a512-1295-4272-9138-f99709370657
2009-04-25 22:24:59 +00:00
Boris Gjenero
88b509b7d2 Fix FS#9926 - On Photo and Color iPods, correct check for whether battery is charging
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20752 a1c6a512-1295-4272-9138-f99709370657
2009-04-19 22:06:17 +00:00
Boris Gjenero
75a0a434d1 Add USB power detection for 4G, Photo, Color, 1G Mini and 2G Mini iPods. (See FS#5826 and FS#7727)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20745 a1c6a512-1295-4272-9138-f99709370657
2009-04-19 18:17:35 +00:00