summaryrefslogtreecommitdiff
path: root/firmware/drivers/button.c (follow)
Commit message (Collapse)AuthorAge
* iBasso DX50/DX90: Major code cleanup and reorganization.Udo Schläpfer2015-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reorganization - Separated iBasso devices from PLATFORM_ANDROID. These are now standlone hosted targets. Most device specific code is in the firmware/target/hosted/ibasso directory. - No dependency on Android SDK, only the Android NDK is needed. 32 bit Android NDK and Android API Level 16. - Separate implementation for each device where feasible. Code cleanup - Rewrite of existing code, from simple reformat to complete reimplementation. - New backlight interface, seperating backlight from touchscreen. - Rewrite of device button handler, removing unneeded code and fixing memory leaks. - New Debug messages interface logging to Android adb logcat (DEBUGF, panicf, logf). - Rewrite of lcd device handler, removing unneeded code and fixing memory leaks. - Rewrite of audiohw device handler/pcm interface, removing unneeded code and fixing memory leaks, enabling 44.1/48kHz pthreaded playback. - Rewrite of power and powermng, proper shutdown, using batterylog results (see http://gerrit.rockbox.org/r/#/c/1047/). - Rewrite of configure (Android NDK) and device specific config. - Rewrite of the Android NDK specific Makefile. Misc - All plugins/games/demos activated. - Update tinyalsa to latest from https://github.com/tinyalsa/tinyalsa. Includes - http://gerrit.rockbox.org/r/#/c/993/ - http://gerrit.rockbox.org/r/#/c/1010/ - http://gerrit.rockbox.org/r/#/c/1035/ Does not include http://gerrit.rockbox.org/r/#/c/1007/ due to new backlight interface and new option for hold switch, touchscreen, physical button interaction. Rockbox needs the iBasso DX50/DX90 loader for startup, see http://gerrit.rockbox.org/r/#/c/1099/ The loader expects Rockbox to be installed in /mnt/sdcard/.rockbox/. If /mnt/sdcard/ is accessed as USB mass storage device, Rockbox will exit gracefully and the loader will restart Rockbox on USB disconnect. Tested on iBasso DX50. Compiled (not tested) for iBasso DX90. Compiled (not tested) for PLATFORM_ANDROID. Change-Id: I5f5e22e68f5b4cf29c28e2b40b2c265f2beb7ab7
* Fix (unintentional) linkage of HAVE_BUTTON_DATA with HAVE_TOUCHSCREENSebastian Leonhardt2014-03-18
| | | | | | | | | | Defining HAVE_BUTTON_DATA without simultaneously defining HAVE_TOUCHSCREEN caused compile errors. (I need them separated for a scrollstrip driver.) Change-Id: I945d3437d840035ccc0c147f8155029b403c6ec2 Reviewed-on: http://gerrit.rockbox.org/771 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com> Reviewed-by: Thomas Martitz <kugel@rockbox.org>
* touch devices: Disable touch on softlock.Jean-Louis Biasini2013-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Target that have a touchpad/touchscreen should disable it while being locked (In order to avoid LCD to drain battery power due to "key locked" constant reporting messages. If they a have a keylock button this was already handled at driver level. If not (e.g. fuze+), they will have to implement a switch at driver level that action.c can operate on softlock. This patch does the following for any target having a touchpad or a touchscreen and no HAS_BUTTON_HOLD (ie any softlock target) 1) it implements the code to call button_enable_touch(bool en) in action.c. 2) button_enable_touch is implemented in button.c and call either touchpad_enable or touchscreen_enable 3) those two function are implemented respectively in touchscreen.c and a new touchpad.c file. They provide a generic way to silents touch's device and call a function at driver level where target specific code can be implemented if possible/needed (for power saving for instance). Those function name are touchpad_enable_device and touchscreen_enable_device 4) we implement an empty function at driver level of targets that need it to have them still being able to compiled. Change-Id: I9ead78a25bd33466a8533f5b9f259b395cb5ce49 Reviewed-on: http://gerrit.rockbox.org/569 Reviewed-by: Thomas Martitz <kugel@rockbox.org> Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* FS#10345 - Gigabeat: Switch volume buttons in Upside Down modeBertrik Sikken2012-04-15
| | | | Change-Id: If2d5ed52e5b52c48b50e412dda52632bb08b0c8d
* Android: listen to ACTION_AUDIO_BECOMING_NOISY for headphone (FS#12097).Dominik Riebeling2011-06-04
| | | | | | | | | | | This event is sent before the audio is routed back to the speaker so we get the information about the unplugged headphone notably earlier. Decrease the debouncing of the headphone status from 1s to 0.5s to work around audio still getting played back via the speaker due to the pause delay by debouncing. On Android we shouldn't need the debouncing at all. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29957 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#11894 - Sansa Clip+ Volume Buttons don't switch when Upside Down is ↵Bertrik Sikken2011-03-13
| | | | | | activated git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29577 a1c6a512-1295-4272-9138-f99709370657
* All kernel objects in code shared amongs targets (core, plugins, codecs) ↵Michael Sevakis2011-02-14
| | | | | | should be declared SHAREDBSS_ATTR as any core could potentially touch them even though they seem only to involve threads on one core. The exception is target code for particular CPUs where proper allocation is fixed. playlist.c was a little odd too-- use one mutex for the current playlist and a separate one for created playlists (still pondering the necessity of more than one). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29305 a1c6a512-1295-4272-9138-f99709370657
* Hopefully fix FS#11696: scrollwheel doesn't respond in some cases.Magnus Holmgren2010-11-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28584 a1c6a512-1295-4272-9138-f99709370657
* Enlarge the button post interval against audio drop outs, Too many lcd updatesThomas Martitz2010-09-22
| | | | | | | | per seconds apparently don't very well. Not sure if it's the hardware or our threading that doesn't play well enough here (UI isn't less response despite of the audio drop outs). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28144 a1c6a512-1295-4272-9138-f99709370657
* Touchscreen: button driver improvementsThomas Martitz2010-09-22
| | | | | | | | | | | | | * Until BUTTON_REPEAT was started, coordinate changes were not exposed. Change that (post on every coordinate change) so that wiping over the screen does actually something between the first touch and BUTTON_REPEAT * Once BUTTON_REPEAT is active, further repeats are posted in an acceleration fashion (slow at the begginning), which smoothes list scrolling. But this has the contrary effect on touchscreen, as it makes swiping appear very laggy. So, remove that acceleration for touchscreen and make it equally fast at all times so the scrollbar is better usable. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28143 a1c6a512-1295-4272-9138-f99709370657
* button driver: make repeat timings be centiseconds and not ticksRafaël Carré2010-09-15
| | | | | | | This doesn't change the value with the current HZ=100, but makes it easy to change HZ in custome builds and still have buttons be usable git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28086 a1c6a512-1295-4272-9138-f99709370657
* Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz2010-06-21
| | | | | | | | | | | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#10887 by me. Change the check for software poweroff to be that ↵Michael Giacomelli2010-05-29
| | | | | | the power button is held, not that the power button is held AND that no other button is held. This makes shutting down players with small tightly spaced buttons (Sandisk...) much easier. This also means that combos involving the power button can now potientially power off the player. The H10 and sansas excluding the Fuze use a combo involving power for AB repeat mode. However, the timeout for shutdown is much longer then the long press duration needed for AB repeat, and in practice seems to not be a problem on these players. I've tested this on various players for a long time and bugged other people to try it out, so I think its pretty safe, but if theres problems it can be reverted or keymaps tweaked. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26397 a1c6a512-1295-4272-9138-f99709370657
* Revert r26055 since it breaks certain Archos targets.Michael Sevakis2010-05-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26067 a1c6a512-1295-4272-9138-f99709370657
* - Move uisimulator/sdl/*.[ch] into the target tree, under ↵Thomas Martitz2010-05-15
| | | | | | | | | | firmware/target/hosted/sdl, uisdl.c is split up across button-sdl.c and system-sdl.c. - Refactor the program startup. main() is now in main.c like on target, and the implicit application thread will now act as our main thread (previously a separate one was created for this in thread initialization). This is part of Rockbox as an application and is the first step to make an application port from the uisimulator. In a further step the sim bits from the sdl build will be separated out. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26065 a1c6a512-1295-4272-9138-f99709370657
* If HAVE_POWEROFF_WHILE_CHARGING is not defined and the charging ↵Michael Sevakis2010-05-15
| | | | | | configuration specifies CHARGING_MONITOR or greater, allow poweroff while plugged but not actually charging the battery. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26055 a1c6a512-1295-4272-9138-f99709370657
* FS#10711 by Martin Ritter fixes handling of the 'First Keypress Enables ↵Nils Wallménius2009-12-04
| | | | | | Backlight Only' setting in simulators git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23849 a1c6a512-1295-4272-9138-f99709370657
* Fix red: Invert buttons in RTL modeTomer Shalev2009-10-05
| | | | | | | | | - Revert renaming of button_set_flip() - Moved rtl flipping logic to apps/actions.c as a static function - Joined rtl_button_flip_needed() and button_flip_horizontally() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22962 a1c6a512-1295-4272-9138-f99709370657
* Invert buttons in RTL modeTomer Shalev2009-10-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22961 a1c6a512-1295-4272-9138-f99709370657
* Simulator buttons: Remove a hack and make brickmania work the same as on target.Karl Kurbjun2009-10-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22936 a1c6a512-1295-4272-9138-f99709370657
* Fix RedKarl Kurbjun2009-10-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22935 a1c6a512-1295-4272-9138-f99709370657
* Button Driver: Add button_status support with data - allows for reading the ↵Karl Kurbjun2009-10-05
| | | | | | /immediate/ value of the touchscreen git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22933 a1c6a512-1295-4272-9138-f99709370657
* Fix red for HAS_SERIAL_REMOTEThomas Martitz2009-09-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22801 a1c6a512-1295-4272-9138-f99709370657
* Fix non-hold button and headphone detection target sims.Thomas Martitz2009-09-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22800 a1c6a512-1295-4272-9138-f99709370657
* Rework the simulators button reading to not implement it's own complete driver.Thomas Martitz2009-09-23
| | | | | | | Instead, implement it more as a target driver with button_read_device(), button_init_device() and button_hold(), then use the normal button driver from firmware/drivers/button.c. Fixes FS#10451 ("backlight off on hold doesn't function properly"). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22799 a1c6a512-1295-4272-9138-f99709370657
* Philips SA9200: fix the buttons to work with flip screen mode (does anyone ↵Mark Arigo2009-07-07
| | | | | | use this?). Change to conventional BUTTON_LEFT/BUTTON_RIGHT names and flip the remaining directional buttons. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21698 a1c6a512-1295-4272-9138-f99709370657
* beginings of a working touchscreen interface for the WPS. 2 new tags:Jonathan Gordon2009-04-20
| | | | | | | | | | | %T|x|y|width|height|action| <- setup a region (relative to the current viewport) where if pressed the "action" will be done (currently play/stop/prev/next/menu/browse work, suggestions for others to add and better names welcome) %Tl<timeout> <- used as a conditional to say if the touchscreen was touched in the last <timeout>, use this to enable/disable button viewports or something... same syntax as other timeout tags cabbiev2 for the mr500 has been modified to demonstrate the new tags. press the pause/play button to pause playback. press the rockbox logo to get back to the menu. pretty icons needed to make this more usable :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20753 a1c6a512-1295-4272-9138-f99709370657
* Split HAVE_SCROLLWHEEL into HAVE_SCROLLWHEEL and HAVE_WHEEL_ACCELERATION, ↵Thomas Martitz2009-03-02
| | | | | | | | | | where the latter now activates the wheel acceleration code. HAVE_SCROLLWHEEL plainly indicates the existence of a scrollwheel, thus all ipods define it now (in addition to the ones and some sansas which did before). Same applies to the manual. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20177 a1c6a512-1295-4272-9138-f99709370657
* Unify kernel list management for ticks, registered queues and timeout ↵Michael Sevakis2009-01-21
| | | | | | objects by using NULL-terminated lists of pointers. Redo timeout API a bit to simplify it and integrate it. Should give some small binsize reduction accross the board but more if timeout objects are being included. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19808 a1c6a512-1295-4272-9138-f99709370657
* Decouple the statusbar drawing from the rest of the screen drawing. it is ↵Jonathan Gordon2008-12-31
| | | | | | | | | | | | not drawn roughly 4x per second automatically. viewport_Set_defaults() will setup the given viewport with the correct "full screen" dimensions (so start at 0,0 if statusbars are disabled or 0,8 if they are enabled.) All screens should keep the statusbar enabled, but if you really want to ignore the user setting you can disbaled it with viewportmanager_set_statusbar(false). This commit also includes some menu/list viewport cleanups from kugel in FS#9603 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19622 a1c6a512-1295-4272-9138-f99709370657
* C200: Also flip the function of the volume buttons when display flip is ↵Marianne Arnold2008-09-03
| | | | | | enabled. I think it is more consistent, especially when thinking of cases where these buttons are used for something else (e.g. left/right in brickmania). Taken from FS#8393 by Volker Mische - add him to CREDITS too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18404 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#9308: differentiate between TOUCHPAD & TOUCHSCREENMaurus Cuelenaere2008-08-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18338 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
* Bring Gigabeat S bootloader one step close to a release version.Michael Sevakis2008-05-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17442 a1c6a512-1295-4272-9138-f99709370657
* Greyscale library: * Implement linearisation curve flipping for 1st/2nd Gen ↵Jens Arnold2008-04-02
| | | | | | iPods (LCD is inverted when backlight is on, so the curve is also inverted). This needs a slight extension of is_backlight_on() functionality in the core. * Thorough recalibration of all reachable greyscale targets, and #ifdef cleanup. * Reduce on-target gamma a bit, because the displayable contrast range of a monochrome/greyscale isn't that high. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16936 a1c6a512-1295-4272-9138-f99709370657
* Do core interrupt masking in a less general fashion and save some ↵Michael Sevakis2008-03-26
| | | | | | instructions to decrease size and speed things up a little bit. Small fix to a few places where interrupts would get enabled again where they shouldn't have been (context switching calls when disabled). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16811 a1c6a512-1295-4272-9138-f99709370657
* Use the timeout API as a oneshot for headphone plug debouncing. Set at 1s ↵Michael Sevakis2008-01-27
| | | | | | for now which seems comfortable and was good for meg-fx but target-specific adjustment is easy enough (my 3G hp jack is dead so I can't check that one :( ). Do some minor rearrangements for init safety and consistency. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16178 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#8341 - rename BUTTON_SCROLL_UP/DOWN to FWD/BACK on the e200 to ↵Jonathan Gordon2008-01-10
| | | | | | make it consistant with the ipods. apart from removing a bit of confusion, it fixes the wheel in pictureflow and possibly elsewhere. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16045 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
* touchpad driver for the mrobe. nothing in apps/ uses it yet.Jonathan Gordon2007-10-22
| | | | | | | Changes to button driver: HAVE_BUTTON_DATA targets pass the button data straight back in the button_read_device() call git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15262 a1c6a512-1295-4272-9138-f99709370657
* Take out some NOCACHEBSS_ATTR's that were accidentally left. Put some ↵Michael Sevakis2007-10-16
| | | | | | threading code in IRAM that should be there on PP502x. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15155 a1c6a512-1295-4272-9138-f99709370657
* Finally full multicore support for PortalPlayer 502x targets with an eye ↵Michael Sevakis2007-10-16
| | | | | | towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
* fix yellow and some house cleaningRobert Kukla2007-10-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15056 a1c6a512-1295-4272-9138-f99709370657
* FS#7487 - mpegplayer - video start time seek with resumeRobert Kukla2007-10-09
| | | | | | | by John S. Gwynne & Brian J. Morey This should stop the patch from breaking again and give them opportunity to improve it further. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15052 a1c6a512-1295-4272-9138-f99709370657
* Name all button light functions and variables consistently starting with ↵Jens Arnold2007-10-07
| | | | | | buttonlight_ . git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15016 a1c6a512-1295-4272-9138-f99709370657
* Commit a subset of the dual core changes that have to do with cache ↵Michael Sevakis2007-09-28
| | | | | | handling, stacks, firmware startup and thread startup. Tested on e200, H10-20GB, iPod Color and 5.5G. Thread function return implemented for all targets. Some changes to plugins to follow shortly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14879 a1c6a512-1295-4272-9138-f99709370657
* Enabled button light for Sansa C200Björn Stenberg2007-09-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14856 a1c6a512-1295-4272-9138-f99709370657
* Enable a lot more features for simulators and add stubs where necessary, ↵Nils Wallménius2007-08-12
| | | | | | 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
* Wheel acceleration for e200. A general acceleration interface intended for ↵Michael Sevakis2007-07-22
| | | | | | use on any scroll target and by any code. A general interface to obtain data associated with most recently dequeued button presses and actions. Use #define HAVE_SCROLLWHEEL and set appropriate constants, values in the scroller driver that feel right. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13959 a1c6a512-1295-4272-9138-f99709370657
* fix the gigabeat remote button not working when backlight is off and filter ↵Jonathan Gordon2007-05-20
| | | | | | first keypress is enabled git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13444 a1c6a512-1295-4272-9138-f99709370657