2006-11-16 02:53:44 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 Jonathan Gordon
|
|
|
|
*
|
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2006-11-16 02:53:44 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include "plugin.h"
|
|
|
|
#include "action.h"
|
|
|
|
#include "pluginlib_actions.h"
|
|
|
|
|
2007-09-20 17:42:28 +00:00
|
|
|
#if defined(HAVE_REMOTE_LCD)
|
2010-05-20 17:41:28 +00:00
|
|
|
/* remote directions */
|
|
|
|
const struct button_mapping pla_remote_ctx[] =
|
2007-09-20 17:42:28 +00:00
|
|
|
{
|
|
|
|
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
|
|
|
|
(CONFIG_KEYPAD == IRIVER_H300_PAD)
|
|
|
|
{ PLA_UP, BUTTON_RC_BITRATE, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN, BUTTON_RC_SOURCE, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT, BUTTON_RC_VOL_DOWN, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RC_VOL_UP, BUTTON_NONE},
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_RC_SOURCE|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) || \
|
|
|
|
(CONFIG_KEYPAD == IRIVER_H10_PAD) || \
|
2009-02-03 10:55:30 +00:00
|
|
|
(CONFIG_KEYPAD == GIGABEAT_PAD) || \
|
2010-05-20 19:05:24 +00:00
|
|
|
(CONFIG_KEYPAD == IAUDIO_M3_PAD) || \
|
2009-02-03 10:55:30 +00:00
|
|
|
(CONFIG_KEYPAD == GIGABEAT_S_PAD)
|
2007-09-20 17:42:28 +00:00
|
|
|
{ PLA_UP, BUTTON_RC_FF, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN, BUTTON_RC_REW, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT, BUTTON_RC_VOL_DOWN, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RC_VOL_UP, BUTTON_NONE},
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == PLAYER_PAD) || \
|
|
|
|
(CONFIG_KEYPAD == RECORDER_PAD)
|
|
|
|
{ PLA_UP, BUTTON_RC_VOL_UP, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT, BUTTON_RC_LEFT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RC_RIGHT, BUTTON_NONE},
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_RC_LEFT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RC_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
|
2009-04-11 07:23:56 +00:00
|
|
|
#elif (CONFIG_REMOTE_KEYPAD == MROBE_REMOTE)
|
|
|
|
{ PLA_UP, BUTTON_RC_PLAY, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN, BUTTON_RC_DOWN, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT, BUTTON_RC_REW, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RC_FF, BUTTON_NONE},
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_RC_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE},
|
2007-09-20 17:42:28 +00:00
|
|
|
#else
|
2010-05-20 17:41:28 +00:00
|
|
|
#error pluginlib_actions: No remote directions
|
2007-09-20 17:42:28 +00:00
|
|
|
#endif
|
2010-05-20 17:41:28 +00:00
|
|
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_PLUGIN),
|
2007-09-20 17:42:28 +00:00
|
|
|
};
|
|
|
|
#endif /* HAVE_REMOTE_LCD */
|
|
|
|
|
2010-05-20 17:41:28 +00:00
|
|
|
/* these were taken from the bubbles plugin, so may need tweaking */
|
|
|
|
const struct button_mapping pla_main_ctx[] =
|
2007-09-20 17:42:28 +00:00
|
|
|
{
|
2010-05-20 17:41:28 +00:00
|
|
|
/* Touchscreens */
|
2008-08-23 09:46:38 +00:00
|
|
|
#ifdef HAVE_TOUCHSCREEN
|
2010-05-20 17:41:28 +00:00
|
|
|
{ PLA_CANCEL, BUTTON_BOTTOMRIGHT, BUTTON_NONE},
|
|
|
|
{ PLA_SELECT, BUTTON_CENTER, BUTTON_NONE},
|
|
|
|
{ PLA_SELECT_REL, BUTTON_CENTER|BUTTON_REL, BUTTON_NONE},
|
|
|
|
{ PLA_SELECT_REPEAT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_UP, BUTTON_TOPMIDDLE, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN, BUTTON_BOTTOMMIDDLE, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT, BUTTON_MIDLEFT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_MIDRIGHT, BUTTON_NONE},
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_TOPMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_BOTTOMMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_NONE},
|
2008-04-16 02:31:20 +00:00
|
|
|
#endif
|
2010-05-20 17:41:28 +00:00
|
|
|
|
|
|
|
/* Directions */
|
|
|
|
#if ((CONFIG_KEYPAD == IRIVER_H100_PAD) \
|
2007-09-20 17:42:28 +00:00
|
|
|
|| (CONFIG_KEYPAD == IRIVER_H300_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == GIGABEAT_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == RECORDER_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == ARCHOS_AV300_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD) \
|
2009-06-01 17:33:20 +00:00
|
|
|
|| (CONFIG_KEYPAD == ONDIO_PAD) \
|
2008-02-17 12:23:02 +00:00
|
|
|
|| (CONFIG_KEYPAD == SANSA_C200_PAD) \
|
2008-02-24 04:12:16 +00:00
|
|
|
|| (CONFIG_KEYPAD == GIGABEAT_S_PAD) \
|
2008-05-21 03:55:17 +00:00
|
|
|
|| (CONFIG_KEYPAD == MROBE100_PAD) \
|
2009-01-24 22:41:55 +00:00
|
|
|
|| (CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) \
|
2008-12-04 21:28:56 +00:00
|
|
|
|| (CONFIG_KEYPAD == SANSA_CLIP_PAD) \
|
2008-12-12 19:50:49 +00:00
|
|
|
|| (CONFIG_KEYPAD == CREATIVEZVM_PAD) \
|
2010-05-20 17:41:28 +00:00
|
|
|
|| (CONFIG_KEYPAD == SANSA_M200_PAD)\
|
|
|
|
|| (CONFIG_KEYPAD == SANSA_E200_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == SANSA_FUZE_PAD) \
|
2011-10-02 15:39:23 +00:00
|
|
|
|| (CONFIG_KEYPAD == SAMSUNG_YH_PAD) \
|
2011-11-16 14:08:01 +00:00
|
|
|
|| (CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD) \
|
Initial commit of the Samsung YP-R0 port.
This port is a hybrid native/RaaA port. It runs on a embedded linux system,
but is the only application. It therefore can implement lots of stuff that
native targets also implement, while leveraging the underlying linux kernel.
The port is quite advanced. User interface, audio playback, plugins work
mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page).
Included in utils/ypr0tools are scripts and programs required to generate
a patched firmware. The patched firmware has the rootfs modified to load
Rockbox. It includes a early/safe USB mode.
This port needs a new toolchain, one that includes glibc headers and libraries.
rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may
also work.
Most of the initial effort is done by Lorenzo Miori and others (on ABI),
including reverse engineering and patching of the original firmware,
initial drivers, and more. Big thanks to you.
Flyspray: FS#12348
Author: Lorenzo Miori, myself
Merry christmas to ypr0 owners! :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
2011-12-24 11:56:46 +00:00
|
|
|
|| (CONFIG_KEYPAD == SANSA_CONNECT_PAD) \
|
2012-03-23 18:32:50 +00:00
|
|
|
|| (CONFIG_KEYPAD == SAMSUNG_YPR0_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == HM60X_PAD))
|
2010-05-20 17:41:28 +00:00
|
|
|
{ PLA_UP, BUTTON_UP, BUTTON_NONE },
|
|
|
|
{ PLA_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
/* now the bad ones that don't have standard names for the directional
|
|
|
|
* buttons */
|
2007-09-20 17:42:28 +00:00
|
|
|
#elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) \
|
2010-05-20 17:41:28 +00:00
|
|
|
|| (CONFIG_KEYPAD == IPOD_3G_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IPOD_4G_PAD)
|
|
|
|
{ PLA_UP, BUTTON_MENU, BUTTON_NONE },
|
2010-05-20 19:05:24 +00:00
|
|
|
{ PLA_DOWN, BUTTON_PLAY, BUTTON_NONE },
|
2010-05-20 17:41:28 +00:00
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
#elif (CONFIG_KEYPAD == PLAYER_PAD)
|
|
|
|
{ PLA_UP, BUTTON_PLAY, BUTTON_NONE },
|
|
|
|
{ PLA_DOWN, BUTTON_STOP, BUTTON_NONE },
|
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_STOP|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
2008-02-24 04:12:16 +00:00
|
|
|
#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{ PLA_UP, BUTTON_SCROLL_UP, BUTTON_NONE },
|
|
|
|
{ PLA_DOWN, BUTTON_SCROLL_DOWN, BUTTON_NONE },
|
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_SCROLL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_SCROLL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
2010-05-20 19:05:24 +00:00
|
|
|
#elif (CONFIG_KEYPAD == IAUDIO_M3_PAD)
|
|
|
|
{ PLA_UP, BUTTON_VOL_UP, BUTTON_NONE },
|
|
|
|
{ PLA_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
2010-11-02 10:58:08 +00:00
|
|
|
#elif (CONFIG_KEYPAD == PHILIPS_HDD6330_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == PHILIPS_SA9200_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{ PLA_UP, BUTTON_UP, BUTTON_NONE },
|
|
|
|
{ PLA_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
|
|
|
{ PLA_LEFT, BUTTON_PREV, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT, BUTTON_NEXT, BUTTON_NONE },
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
#elif (CONFIG_KEYPAD == IAUDIO67_PAD)
|
|
|
|
{ PLA_UP, BUTTON_STOP, BUTTON_NONE },
|
|
|
|
{ PLA_DOWN, BUTTON_PLAY, BUTTON_NONE },
|
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_STOP|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
2010-02-11 22:40:17 +00:00
|
|
|
#elif (CONFIG_KEYPAD == PBELL_VIBE500_PAD)
|
|
|
|
{ PLA_UP, BUTTON_UP, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN, BUTTON_DOWN, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT, BUTTON_PREV, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_NEXT, BUTTON_NONE},
|
2010-05-24 19:48:06 +00:00
|
|
|
{ PLA_UP_REPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
2010-02-11 22:40:17 +00:00
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE},
|
2010-04-26 21:40:00 +00:00
|
|
|
#elif (CONFIG_KEYPAD == MPIO_HD200_PAD)
|
2010-11-02 10:44:34 +00:00
|
|
|
{ PLA_UP, BUTTON_REW, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN, BUTTON_FF, BUTTON_NONE},
|
2010-04-26 21:40:00 +00:00
|
|
|
{ PLA_LEFT, BUTTON_VOL_DOWN, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_VOL_UP, BUTTON_NONE},
|
2010-11-02 10:44:34 +00:00
|
|
|
{ PLA_UP_REPEAT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_FF|BUTTON_REPEAT, BUTTON_NONE},
|
2010-04-26 21:40:00 +00:00
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE},
|
2010-11-30 10:52:14 +00:00
|
|
|
#elif (CONFIG_KEYPAD == MPIO_HD300_PAD)
|
|
|
|
{ PLA_UP, BUTTON_UP, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN, BUTTON_DOWN, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT, BUTTON_REW, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_FF, BUTTON_NONE},
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_FF|BUTTON_REPEAT, BUTTON_NONE},
|
2011-09-06 12:39:49 +00:00
|
|
|
#elif (CONFIG_KEYPAD == RK27XX_GENERIC_PAD)
|
|
|
|
{ PLA_UP, BUTTON_REW, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN, BUTTON_FF, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT, BUTTON_REW|BUTTON_M, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_FF|BUTTON_M, BUTTON_NONE},
|
|
|
|
{ PLA_UP_REPEAT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_FF|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_REW|BUTTON_M|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_FF|BUTTON_M|BUTTON_REPEAT, BUTTON_NONE},
|
2007-09-20 17:42:28 +00:00
|
|
|
#else
|
2010-05-20 19:05:24 +00:00
|
|
|
# ifndef HAVE_TOUCHSCREEN
|
|
|
|
# error pluginlib_actions: No directions defined
|
|
|
|
# endif
|
2008-04-16 02:31:20 +00:00
|
|
|
#endif
|
2010-04-26 21:40:00 +00:00
|
|
|
|
2010-05-20 17:41:28 +00:00
|
|
|
/* Scrollwheels */
|
|
|
|
#ifdef HAVE_SCROLLWHEEL
|
|
|
|
{ PLA_SCROLL_BACK, BUTTON_SCROLL_BACK, BUTTON_NONE },
|
|
|
|
{ PLA_SCROLL_FWD, BUTTON_SCROLL_FWD, BUTTON_NONE },
|
|
|
|
{ PLA_SCROLL_BACK_REPEAT,BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{ PLA_SCROLL_FWD_REPEAT, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE },
|
2007-09-20 17:42:28 +00:00
|
|
|
#endif
|
|
|
|
|
2010-05-20 17:41:28 +00:00
|
|
|
/* Actions */
|
2007-09-20 17:42:28 +00:00
|
|
|
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_CANCEL, BUTTON_OFF, BUTTON_NONE },
|
|
|
|
{PLA_CANCEL, BUTTON_RC_STOP, BUTTON_NONE },
|
|
|
|
{PLA_EXIT, BUTTON_ON, BUTTON_NONE },
|
2010-06-05 17:29:06 +00:00
|
|
|
{PLA_EXIT, BUTTON_RC_MENU, BUTTON_NONE },
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_SELECT, BUTTON_SELECT, BUTTON_NONE },
|
|
|
|
{PLA_SELECT, BUTTON_RC_ON, BUTTON_NONE },
|
|
|
|
{PLA_SELECT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
|
|
|
|
{PLA_SELECT_REL, BUTTON_RC_ON|BUTTON_REL, BUTTON_RC_ON },
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_RC_ON|BUTTON_REPEAT, BUTTON_NONE },
|
2007-09-20 17:42:28 +00:00
|
|
|
#elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IPOD_3G_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IPOD_4G_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_CANCEL, BUTTON_MENU|BUTTON_SELECT, BUTTON_NONE },
|
|
|
|
{PLA_EXIT, BUTTON_PLAY|BUTTON_SELECT, BUTTON_NONE },
|
|
|
|
{PLA_SELECT, BUTTON_SELECT, BUTTON_NONE },
|
|
|
|
{PLA_SELECT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
#elif (CONFIG_KEYPAD == IAUDIO_X5M5_PAD)
|
2010-06-05 16:21:34 +00:00
|
|
|
{PLA_CANCEL, BUTTON_REC, BUTTON_NONE },
|
|
|
|
{PLA_CANCEL, BUTTON_RC_REC|BUTTON_REL, BUTTON_RC_REC},
|
|
|
|
{PLA_EXIT, BUTTON_POWER, BUTTON_NONE },
|
|
|
|
{PLA_EXIT, BUTTON_RC_REC|BUTTON_REPEAT, BUTTON_NONE },
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_SELECT, BUTTON_SELECT, BUTTON_NONE },
|
|
|
|
{PLA_SELECT, BUTTON_RC_MODE, BUTTON_NONE },
|
|
|
|
{PLA_SELECT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
|
|
|
|
{PLA_SELECT_REL, BUTTON_RC_MODE|BUTTON_REL, BUTTON_RC_MODE },
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_NONE },
|
|
|
|
#elif (CONFIG_KEYPAD == GIGABEAT_PAD \
|
|
|
|
|| CONFIG_KEYPAD == SANSA_E200_PAD \
|
|
|
|
|| CONFIG_KEYPAD == SANSA_C200_PAD \
|
|
|
|
|| CONFIG_KEYPAD == SANSA_CLIP_PAD \
|
|
|
|
|| CONFIG_KEYPAD == SANSA_M200_PAD \
|
|
|
|
|| CONFIG_KEYPAD == MROBE100_PAD \
|
2011-11-16 14:08:01 +00:00
|
|
|
|| CONFIG_KEYPAD == PHILIPS_HDD1630_PAD \
|
2012-03-23 18:32:50 +00:00
|
|
|
|| CONFIG_KEYPAD == SANSA_CONNECT_PAD \
|
|
|
|
|| CONFIG_KEYPAD == HM60X_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER},
|
|
|
|
{PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
Initial commit of the Samsung YP-R0 port.
This port is a hybrid native/RaaA port. It runs on a embedded linux system,
but is the only application. It therefore can implement lots of stuff that
native targets also implement, while leveraging the underlying linux kernel.
The port is quite advanced. User interface, audio playback, plugins work
mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page).
Included in utils/ypr0tools are scripts and programs required to generate
a patched firmware. The patched firmware has the rootfs modified to load
Rockbox. It includes a early/safe USB mode.
This port needs a new toolchain, one that includes glibc headers and libraries.
rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may
also work.
Most of the initial effort is done by Lorenzo Miori and others (on ABI),
including reverse engineering and patching of the original firmware,
initial drivers, and more. Big thanks to you.
Flyspray: FS#12348
Author: Lorenzo Miori, myself
Merry christmas to ypr0 owners! :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
2011-12-24 11:56:46 +00:00
|
|
|
#elif (CONFIG_KEYPAD == GIGABEAT_S_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == SAMSUNG_YPR0_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_CANCEL, BUTTON_BACK, BUTTON_NONE},
|
|
|
|
{PLA_EXIT, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == RECORDER_PAD)
|
|
|
|
{PLA_CANCEL, BUTTON_ON, BUTTON_NONE},
|
|
|
|
{PLA_EXIT, BUTTON_OFF, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == ARCHOS_AV300_PAD)
|
|
|
|
{PLA_CANCEL, BUTTON_OFF|BUTTON_REL, BUTTON_OFF},
|
|
|
|
{PLA_EXIT, BUTTON_OFF|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == ONDIO_PAD)
|
|
|
|
{PLA_CANCEL, BUTTON_OFF|BUTTON_REL, BUTTON_OFF},
|
|
|
|
{PLA_EXIT, BUTTON_OFF|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_MENU|BUTTON_REL, BUTTON_MENU},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == PLAYER_PAD)
|
|
|
|
{PLA_CANCEL, BUTTON_MENU|BUTTON_REL, BUTTON_MENU},
|
|
|
|
{PLA_EXIT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_ON, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_ON|BUTTON_REL, BUTTON_ON},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_ON|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == SANSA_FUZE_PAD)
|
|
|
|
{PLA_CANCEL, BUTTON_HOME|BUTTON_REL, BUTTON_HOME},
|
|
|
|
{PLA_EXIT, BUTTON_HOME|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
|
2010-05-20 19:05:24 +00:00
|
|
|
{PLA_CANCEL, BUTTON_REW, BUTTON_NONE},
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_EXIT, BUTTON_POWER, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD)
|
|
|
|
{PLA_CANCEL, BUTTON_EQ|BUTOTN_REL, BUTTON_EQ},
|
|
|
|
{PLA_EXIT, BUTTON_EQ|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
2007-10-22 01:29:16 +00:00
|
|
|
#elif (CONFIG_KEYPAD == MROBE500_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER},
|
|
|
|
{PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_RC_HEART, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_RC_HEART|BUTTON_REL, BUTTON_RC_HEART},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_RC_HEART|BUTTON_REPEAT, BUTTON_NONE},
|
2009-12-15 20:51:41 +00:00
|
|
|
#elif (CONFIG_KEYPAD == COWON_D2_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER},
|
|
|
|
{PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_MINUS, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_MINUS|BUTTON_REL, BUTTON_MINUS},
|
2012-01-26 23:01:42 +00:00
|
|
|
{PLA_SELECT_REPEAT, BUTTON_MINUS|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == ANDROID_PAD)
|
|
|
|
{PLA_CANCEL, BUTTON_BACK|BUTTON_REL, BUTTON_BACK},
|
|
|
|
{PLA_EXIT, BUTTON_BACK|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_MENU|BUTTON_REL, BUTTON_MENU},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE},
|
2010-05-20 17:41:28 +00:00
|
|
|
#elif (CONFIG_KEYPAD == IAUDIO_M3_PAD)
|
|
|
|
{PLA_CANCEL, BUTTON_RC_REC|BUTTON_REL, BUTTON_RC_REC},
|
|
|
|
{PLA_EXIT, BUTTON_RC_REC|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_RC_MODE, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_RC_MODE|BUTTON_REL, BUTTON_RC_MODE},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_NONE},
|
2010-11-02 10:58:08 +00:00
|
|
|
#elif (CONFIG_KEYPAD == PHILIPS_HDD6330_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == PHILIPS_SA9200_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_EXIT, BUTTON_POWER, BUTTON_NONE},
|
2010-10-21 02:45:06 +00:00
|
|
|
{PLA_CANCEL, BUTTON_MENU, BUTTON_NONE},
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
|
2008-09-06 17:50:59 +00:00
|
|
|
#elif (CONFIG_KEYPAD == IAUDIO67_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER},
|
|
|
|
{PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT BUTTON_NONE},
|
2008-12-04 21:28:56 +00:00
|
|
|
#elif (CONFIG_KEYPAD == CREATIVEZVM_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_CANCEL, BUTTON_BACK|BUTTON_REL, BUTTON_BACK},
|
|
|
|
{PLA_EXIT, BUTTON_BACK|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
2009-04-07 23:41:44 +00:00
|
|
|
#elif (CONFIG_KEYPAD == ONDAVX747_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER},
|
|
|
|
{PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_VOL_UP, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_VOL_UP|BUTTON_REL, BUTTON_VOL_UP},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE},
|
2009-08-04 03:08:32 +00:00
|
|
|
#elif (CONFIG_KEYPAD == SAMSUNG_YH_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_CANCEL, BUTTON_REW, BUTTON_NONE},
|
|
|
|
{PLA_EXIT, BUTTON_FFWD, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
|
2010-02-11 22:40:17 +00:00
|
|
|
#elif (CONFIG_KEYPAD == PBELL_VIBE500_PAD)
|
2010-05-20 17:41:28 +00:00
|
|
|
{PLA_CANCEL, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{PLA_EXIT, BUTTON_REC, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_OK, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_OK|BUTTON_REL, BUTTON_OK },
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_OK|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == MPIO_HD200_PAD)
|
|
|
|
{PLA_CANCEL, BUTTON_REC, BUTTON_NONE},
|
|
|
|
{PLA_EXIT, (BUTTON_REC|BUTTON_PLAY), BUTTON_NONE},
|
2010-11-02 10:44:34 +00:00
|
|
|
{PLA_SELECT, BUTTON_FUNC, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_FUNC|BUTTON_REL, BUTTON_FUNC},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_FUNC|BUTTON_REPEAT, BUTTON_NONE},
|
2010-11-30 10:52:14 +00:00
|
|
|
#elif (CONFIG_KEYPAD == MPIO_HD300_PAD)
|
|
|
|
{PLA_CANCEL, BUTTON_MENU, BUTTON_NONE},
|
2012-02-09 13:54:44 +00:00
|
|
|
{PLA_EXIT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE},
|
2010-11-30 10:52:14 +00:00
|
|
|
{PLA_SELECT, BUTTON_ENTER, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_ENTER|BUTTON_REL, BUTTON_ENTER},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_ENTER|BUTTON_REPEAT, BUTTON_NONE},
|
2011-09-06 12:39:49 +00:00
|
|
|
#elif (CONFIG_KEYPAD == RK27XX_GENERIC_PAD)
|
|
|
|
{PLA_CANCEL, BUTTON_M, BUTTON_NONE},
|
|
|
|
{PLA_EXIT, BUTTON_M|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
|
2011-10-02 15:39:23 +00:00
|
|
|
#elif (CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD)
|
|
|
|
{PLA_CANCEL, BUTTON_BACK, BUTTON_NONE},
|
2012-02-09 13:54:44 +00:00
|
|
|
{PLA_EXIT, BUTTON_POWER, BUTTON_NONE},
|
2011-10-02 15:39:23 +00:00
|
|
|
{PLA_SELECT, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_SELECT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT},
|
|
|
|
{PLA_SELECT_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
2008-01-23 08:25:04 +00:00
|
|
|
#else
|
2010-05-20 19:05:24 +00:00
|
|
|
# ifndef HAVE_TOUCHSCREEN
|
|
|
|
# error pluginlib_actions: No actions defined
|
|
|
|
# endif
|
2008-01-23 08:25:04 +00:00
|
|
|
#endif
|
2010-05-20 17:41:28 +00:00
|
|
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_PLUGIN),
|
2008-01-23 08:25:04 +00:00
|
|
|
};
|
|
|
|
|
2006-11-16 02:53:44 +00:00
|
|
|
static struct button_mapping **plugin_context_order;
|
|
|
|
static int plugin_context_count = 0;
|
|
|
|
static int last_context = 0; /* index into plugin_context_order
|
|
|
|
of the last context returned */
|
|
|
|
|
2008-05-04 13:21:07 +00:00
|
|
|
static const struct button_mapping* get_context_map(int context)
|
2006-11-16 02:53:44 +00:00
|
|
|
{
|
|
|
|
(void)context;
|
|
|
|
if (last_context<plugin_context_count)
|
|
|
|
return plugin_context_order[last_context++];
|
|
|
|
else return NULL;
|
|
|
|
}
|
|
|
|
|
2009-01-16 10:34:40 +00:00
|
|
|
int pluginlib_getaction(int timeout,
|
2006-11-16 02:53:44 +00:00
|
|
|
const struct button_mapping *plugin_contexts[],
|
|
|
|
int count)
|
|
|
|
{
|
|
|
|
plugin_context_order = (struct button_mapping **)plugin_contexts;
|
|
|
|
plugin_context_count = count;
|
|
|
|
last_context = 0;
|
2009-05-31 17:47:56 +00:00
|
|
|
return rb->get_custom_action(CONTEXT_PLUGIN,timeout,get_context_map);
|
2006-11-16 02:53:44 +00:00
|
|
|
}
|