summaryrefslogtreecommitdiff
path: root/firmware/target/arm/ipod/button-clickwheel.c (follow)
Commit message (Collapse)AuthorAge
* nano2g: fix dangerous mutex in hold switchCástor Muñoz2017-02-04
| | | | | | | | | This is a quick patch to solve FS#13104, we can not disable the clickwheel LDO from within interrupt code, so for the moment we leave it enabled all the time, it is unknown how power comsumption is affected when the hold switch is locked. Change-Id: I8f675702e2b5becbcd9197c8b044e6b8daeea79f
* iPod Classic: use PMU interrupts to detect hold switchCástor Muñoz2016-05-26
| | | | | | | Finally the hold switch workaround is removed and it is detected in the same way as OF does. Change-Id: Iceac6ca48ffd131b8ee9f62ffdc2b3e30eb02042
* iPod Classic: clickwheel fixesCástor Muñoz2015-12-17
| | | | | | | | | | | | | | | | | | | | | | Uses GPIO.E2 (Request To Send) to detect the holdswitch status, it is a temporal workaround that seems to work on all models. Holdswitch status must be detected to drive low GPIO.E2 (RTS) and GPIO.E4 (Data Out) when the holdswitch is locked, otherwise battery life decreases about 25%. Holdswitch unlock action is detected by reading the HELLO message that the external wheel controller sends when it is powered on, this allows to quickly capture clickwheel activity after unlock. GPIO.E2 is also used in case the HELLO message is missed because the holdswitch was unlocked before Rockbox/bootloader starts. These 2 lines (RTS and DOUT) can not be used to transmit messages to the external clickwheel controller, not a problem, actually no messages are sent while normal operation, only at initialization stage. Change-Id: I415fe54bfcbc2086d0f56d7affe6f789ce81a6db
* iPod Classic: Fix bidirectional clickwheel communication.Steffen Butzer2014-10-02
| | | | | | | | | | | | | | | | | | | This restores functionality that was broken in g#194 and committed as revision 7ec426e497daa1b4a6082bf4e4e3df687b11db44. Bidirectional communication is required to ask the clickwheel controller for the initial button state during boot. Otherwise our driver would only know about pressed buttons when the first change event is received, which is too late for e.g. prevention of USB connection during boot. This fix is also required to support the selection of OF, Rockbox, Disk Mode, etc. in the iPod Classic Rockbox bootloader. Change-Id: I127d54cf9e630d8075dd6d66f95dacb2816bfbc8 Reviewed-on: http://gerrit.rockbox.org/938 Reviewed-by: Michael Sparmann <theseven@gmx.net> Tested: Michael Sparmann <theseven@gmx.net> Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
* Classic/6G: click wheel controller powersaveCástor Muñoz2012-03-31
| | | | | | | Mask click wheel controller clock gate when the hold switch is in the locked position Change-Id: I9de33db189afdb76cc5057e4c0e7efc587cf762b
* Classic/6G: hold switch detection using GPIOCástor Muñoz2012-03-28
| | | | | | | | | Configures GPIO ports to detect holdswitch status instead of polling the PMU via I2C, this fixes some random crashes Change-Id: I407c9ca4c2c9203842f9e774b1c8d0455d59048c Reviewed-on: http://gerrit.rockbox.org/194 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
* Make local functions and variables static where possibleBertrik Sikken2011-11-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30897 a1c6a512-1295-4272-9138-f99709370657
* ipod6g: make functions and variables static where possibleBertrik Sikken2011-04-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29767 a1c6a512-1295-4272-9138-f99709370657
* Merge functionality of wakeups and semaphores-- fewer APIs and object types. ↵Michael Sevakis2011-03-02
| | | | | | semaphore_wait takes a timeout now so codecs and plugins have to be made incompatible. Don't make semaphores for targets not using them. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29492 a1c6a512-1295-4272-9138-f99709370657
* iPod Nano2g/Classic clickwheel: Configure GPIO pins as Hi-Z while hold ↵Michael Sparmann2011-02-10
| | | | | | switch is engaged git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29276 a1c6a512-1295-4272-9138-f99709370657
* Fix more red. Two had been hiding.Michael Sparmann2011-02-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29274 a1c6a512-1295-4272-9138-f99709370657
* Fix redMichael Sparmann2011-02-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29273 a1c6a512-1295-4272-9138-f99709370657
* iPod Nano 2G: Fix current leak through clickwheel GPIOs when clickwheel is ↵Michael Sparmann2011-02-10
| | | | | | powered down git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29272 a1c6a512-1295-4272-9138-f99709370657
* iPod Classic: Fix current leak through clickwheel GPIOs when clickwheel is ↵Michael Sparmann2011-02-10
| | | | | | powered down git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29267 a1c6a512-1295-4272-9138-f99709370657
* iPod Classic: This time really fix the hold switch. Read it out through the ↵Michael Sparmann2011-02-09
| | | | | | power manager, and cache the result for 100 milliseconds because the power manager doesn't like being spammed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29264 a1c6a512-1295-4272-9138-f99709370657
* iPod Classic: Fix hold switch glitchesMichael Sparmann2011-02-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29242 a1c6a512-1295-4272-9138-f99709370657
* Implement hold switch and headphone detection on iPod ClassicMichael Sparmann2011-01-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29001 a1c6a512-1295-4272-9138-f99709370657
* Fix headphone detection on iPod Nano 2G being inverted (regression from r28800)Michael Sparmann2010-12-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28843 a1c6a512-1295-4272-9138-f99709370657
* iPod Nano 2G: Correct clickwheel interrupt handler name, this time consistently.Michael Sparmann2010-12-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28807 a1c6a512-1295-4272-9138-f99709370657
* Fix bug introduced with r28800 (missing interrupt handler).Andree Buschmann2010-12-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28806 a1c6a512-1295-4272-9138-f99709370657
* usb-s3c6400x.[ch], button-clickwheel.c: Move s5l8701-specific parts to where ↵Michael Sparmann2010-12-12
| | | | | | they belong, prepare for s5l8702 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28800 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#11663 by me - Patch: iPod Nano 2G Bootloader: Boot OF if MENU ↵Michael Sparmann2010-10-10
| | | | | | button is held git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28237 a1c6a512-1295-4272-9138-f99709370657
* Disable clickwheel power supply when hold button is active for iPod nano 2G.Andree Buschmann2010-09-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28161 a1c6a512-1295-4272-9138-f99709370657
* Higher responsiveness for iPod clickwheel acceleration.Andree Buschmann2010-03-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25047 a1c6a512-1295-4272-9138-f99709370657
* Add iPod Nano 2G µsec timer, and use it in the clickwheel driver.Michael Sparmann2009-10-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23309 a1c6a512-1295-4272-9138-f99709370657
* Fix the iPod Nano 2G clickwheel when releasing the hold switchMichael Sparmann2009-10-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23122 a1c6a512-1295-4272-9138-f99709370657
* Nano2G - implement "Pause on headphone unplug" featureDave Chapman2009-10-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23072 a1c6a512-1295-4272-9138-f99709370657
* Unify the button driver for the Nano 2G with the driver for earlier ↵Dave Chapman2009-10-02
| | | | | | 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
* Fix a comment so that it matches the codeDave Chapman2009-09-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22718 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#5230 - reinit the opto-i2c after disabling hold so the buttons work againJonathan Gordon2009-07-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22078 a1c6a512-1295-4272-9138-f99709370657
* Fix duplicate #includesBertrik Sikken2009-05-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20977 a1c6a512-1295-4272-9138-f99709370657
* Remove unnecessary #include "adc.h"Bertrik Sikken2009-04-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20791 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#8624 by Linus Nielsen, Ryan Press, Craig Elliott, and Kenderes ↵Michael Giacomelli2008-12-25
| | | | | | Tamas. Adds preliminary support for numerous accessories that use the ipod serial port on the dock connector. See IpodAccessories for a list of tested devices. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19585 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* Oops. Lost sync on a few instances and 'HI' registers.Michael Sevakis2008-06-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17684 a1c6a512-1295-4272-9138-f99709370657
* Undo r17470 because of regressions in some debug menus.Andree Buschmann2008-05-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17472 a1c6a512-1295-4272-9138-f99709370657
* Fix for FS#5162. Being able to read scrollwheel action via ↵Andree Buschmann2008-05-12
| | | | | | button_read_device() for iPod's and e200. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17470 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#8379 by Andree Buschmann. Disables much of the remaining unneeded ↵Michael Giacomelli2008-02-10
| | | | | | 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
* FS#7738 - Scroll wheel acceleration for iPodLinus Nielsen Feltzing2007-11-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15681 a1c6a512-1295-4272-9138-f99709370657
* iPods: Touching the wheel now resets the poweroff timer, so the iPod no ↵Jens Arnold2007-01-18
| | | | | | longer shuts down unexpectedly while operating the wheel only, e.g. in the text viewer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12068 a1c6a512-1295-4272-9138-f99709370657
* Convert queues to use intptr_t for event data and return values as most of ↵Michael Sevakis2006-12-19
| | | | | | the time pointer are not passed and it should make some things a bit cleaner. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11818 a1c6a512-1295-4272-9138-f99709370657
* Move iPod headphone detection into target tree (FS#6131 by Robert Keevil) ↵Daniel Ankers2006-10-07
| | | | | | and fix detection on 3G iPod git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11143 a1c6a512-1295-4272-9138-f99709370657
* Move all iPod targets into the target tree. FS#5890Barry Wardell2006-10-05
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11129 a1c6a512-1295-4272-9138-f99709370657