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)
|
|
|
|
const struct button_mapping remote_directions[] =
|
|
|
|
{
|
|
|
|
#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) || \
|
|
|
|
(CONFIG_KEYPAD == GIGABEAT_PAD)
|
|
|
|
{ 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},
|
|
|
|
#else
|
|
|
|
#error pluginlib_actions: Unsupported remote keypad
|
|
|
|
#endif
|
|
|
|
{CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
|
|
|
|
};
|
|
|
|
#endif /* HAVE_REMOTE_LCD */
|
|
|
|
|
|
|
|
const struct button_mapping generic_directions[] =
|
|
|
|
{
|
2008-08-23 09:46:38 +00:00
|
|
|
#ifdef HAVE_TOUCHSCREEN
|
2008-04-16 02:31:20 +00:00
|
|
|
{ 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},
|
|
|
|
#endif
|
2007-09-20 17:42:28 +00:00
|
|
|
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) \
|
|
|
|
|| (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) \
|
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) \
|
2008-10-31 18:54:37 +00:00
|
|
|
|| (CONFIG_KEYPAD == PHILIPS_SA9200_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) \
|
|
|
|
|| (CONFIG_KEYPAD == SANSA_M200_PAD)
|
2007-09-20 17:42: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},
|
|
|
|
#elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IPOD_3G_PAD) \
|
2009-01-04 23:33:15 +00:00
|
|
|
|| (CONFIG_KEYPAD == IPOD_4G_PAD) \
|
2008-01-10 08:08:31 +00:00
|
|
|
|| (CONFIG_KEYPAD == SANSA_E200_PAD) \
|
2009-01-04 23:33:15 +00:00
|
|
|
|| (CONFIG_KEYPAD == SANSA_FUZE_PAD)
|
2008-01-10 08:08:31 +00:00
|
|
|
{ PLA_UP, BUTTON_SCROLL_BACK, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN, BUTTON_SCROLL_FWD, BUTTON_NONE},
|
2007-09-20 17:42:28 +00:00
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
|
2008-01-10 08:08:31 +00:00
|
|
|
{ PLA_UP_REPEAT, BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN_REPEAT, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE},
|
2007-09-20 17:42:28 +00:00
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif CONFIG_KEYPAD == ONDIO_PAD
|
|
|
|
{ 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},
|
|
|
|
#elif CONFIG_KEYPAD == PLAYER_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},
|
2008-02-24 04:12:16 +00:00
|
|
|
#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
|
2007-09-20 17:42: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},
|
2007-10-22 01:29:16 +00:00
|
|
|
#elif (CONFIG_KEYPAD == MROBE500_PAD)
|
|
|
|
{ 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},
|
2008-01-14 22:04:48 +00:00
|
|
|
#elif (CONFIG_KEYPAD == COWOND2_PAD)
|
2008-03-22 10:24:28 +00:00
|
|
|
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
|
|
|
|
{ PLA_UP, BUTTON_RC_VOL_UP, BUTTON_NONE},
|
|
|
|
{ PLA_DOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT, BUTTON_RC_REW, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RC_FF, 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_REW|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE},
|
2008-09-06 17:50:59 +00:00
|
|
|
#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},
|
2007-09-20 17:42:28 +00:00
|
|
|
#else
|
|
|
|
#error pluginlib_actions: Unsupported keypad
|
|
|
|
#endif
|
|
|
|
{CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
|
|
|
|
};
|
|
|
|
|
|
|
|
const struct button_mapping generic_left_right_fire[] =
|
|
|
|
{
|
2008-08-23 09:46:38 +00:00
|
|
|
#ifdef HAVE_TOUCHSCREEN
|
2008-04-16 02:31:20 +00:00
|
|
|
{ PLA_LEFT, BUTTON_MIDLEFT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_MIDRIGHT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE, BUTTON_CENTER, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#endif
|
2007-09-20 17:42:28 +00:00
|
|
|
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IRIVER_H300_PAD) \
|
2008-02-24 04:12:16 +00:00
|
|
|
|| (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \
|
2007-09-20 17:42:28 +00:00
|
|
|
|| (CONFIG_KEYPAD == GIGABEAT_PAD) \
|
2008-02-17 12:23:02 +00:00
|
|
|
|| (CONFIG_KEYPAD == IRIVER_IFP7XX_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) \
|
2008-10-31 18:54:37 +00:00
|
|
|
|| (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) \
|
2008-12-12 19:50:49 +00:00
|
|
|
|| (CONFIG_KEYPAD == SANSA_CLIP_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == SANSA_M200_PAD)
|
2007-09-20 17:42:28 +00:00
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IPOD_3G_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IPOD_4G_PAD)
|
|
|
|
{ PLA_LEFT, BUTTON_SCROLL_BACK, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_SCROLL_FWD, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_NONE},
|
|
|
|
#elif CONFIG_KEYPAD == ONDIO_PAD
|
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE, BUTTON_UP, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif CONFIG_KEYPAD == PLAYER_PAD
|
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE, BUTTON_ON, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_ON|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif CONFIG_KEYPAD == RECORDER_PAD
|
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == SANSA_C200_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == ARCHOS_AV300_PAD)
|
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_NONE},
|
2009-01-04 23:33:15 +00:00
|
|
|
#elif (CONFIG_KEYPAD == SANSA_E200_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == SANSA_FUZE_PAD)
|
2007-09-20 17:42:28 +00:00
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_NONE},
|
2008-02-24 04:12:16 +00:00
|
|
|
#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
|
2007-09-20 17:42:28 +00:00
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE, BUTTON_REW, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE},
|
2007-10-22 01:29:16 +00:00
|
|
|
#elif (CONFIG_KEYPAD == MROBE500_PAD)
|
|
|
|
{ PLA_LEFT, BUTTON_RC_REW, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RC_FF, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE, BUTTON_RC_HEART, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_RC_HEART|BUTTON_REPEAT, BUTTON_NONE},
|
2008-01-14 22:04:48 +00:00
|
|
|
#elif (CONFIG_KEYPAD == COWOND2_PAD)
|
2008-04-15 22:35:00 +00:00
|
|
|
{ PLA_LEFT, BUTTON_MINUS, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_MINUS|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_PLUS, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_PLUS|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE},
|
2008-03-22 10:24:28 +00:00
|
|
|
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
|
|
|
|
{ PLA_LEFT, BUTTON_RC_REW, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RC_FF, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE, BUTTON_RC_MODE, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_NONE},
|
2008-09-06 17:50:59 +00:00
|
|
|
#elif (CONFIG_KEYPAD == IAUDIO67_PAD)
|
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE},
|
2008-12-04 21:28:56 +00:00
|
|
|
#elif (CONFIG_KEYPAD == CREATIVEZVM_PAD)
|
|
|
|
{ PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
|
|
|
|
{ PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{ PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
|
2008-12-08 09:51:42 +00:00
|
|
|
{ PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{ PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
2007-09-20 17:42:28 +00:00
|
|
|
#else
|
|
|
|
#error pluginlib_actions: Unsupported keypad
|
|
|
|
#endif
|
|
|
|
{CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
|
|
|
|
};
|
|
|
|
|
|
|
|
/* these were taken from the bubbles plugin, so may need tweaking */
|
|
|
|
const struct button_mapping generic_actions[] =
|
|
|
|
{
|
2008-08-23 09:46:38 +00:00
|
|
|
#ifdef HAVE_TOUCHSCREEN
|
2008-04-16 02:31:20 +00:00
|
|
|
{PLA_QUIT, BUTTON_BOTTOMRIGHT, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_CENTER, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_TOPLEFT, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_BOTTOMMIDDLE, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_BOTTOMMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#endif
|
2007-09-20 17:42:28 +00:00
|
|
|
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
|
|
|
|
{PLA_QUIT, BUTTON_OFF, BUTTON_NONE},
|
|
|
|
{PLA_QUIT, BUTTON_RC_STOP, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_ON, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_RC_ON, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_MODE, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_RC_MENU, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_RC_MENU|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IPOD_3G_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IPOD_4G_PAD)
|
|
|
|
{PLA_QUIT, BUTTON_MENU|BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
|
|
|
|
{PLA_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD
|
|
|
|
{PLA_QUIT, BUTTON_POWER, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_RC_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_REC, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_RC_MENU, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_RC_MODE, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif CONFIG_KEYPAD == GIGABEAT_PAD
|
2008-03-18 09:24:35 +00:00
|
|
|
{PLA_QUIT, BUTTON_POWER, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_A, BUTTON_NONE},
|
2007-09-20 17:42:28 +00:00
|
|
|
{PLA_MENU, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
2008-02-17 12:23:02 +00:00
|
|
|
#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
|
|
|
|
{PLA_QUIT, BUTTON_BACK, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
2007-09-20 17:42:28 +00:00
|
|
|
#elif CONFIG_KEYPAD == RECORDER_PAD
|
|
|
|
{PLA_QUIT, BUTTON_OFF, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_ON, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_F1, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif CONFIG_KEYPAD == ARCHOS_AV300_PAD
|
|
|
|
{PLA_QUIT, BUTTON_OFF, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_ON, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_F1, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif CONFIG_KEYPAD == ONDIO_PAD
|
|
|
|
{PLA_QUIT, BUTTON_OFF, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_DOWN, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_UP, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif CONFIG_KEYPAD == PLAYER_PAD
|
|
|
|
{PLA_QUIT, BUTTON_STOP|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_ON, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_ON|BUTTON_REPEAT, BUTTON_NONE},
|
2009-01-04 23:33:15 +00:00
|
|
|
#elif CONFIG_KEYPAD == SANSA_E200_PAD || \
|
|
|
|
CONFIG_KEYPAD == SANSA_C200_PAD || \
|
|
|
|
CONFIG_KEYPAD == SANSA_CLIP_PAD || \
|
|
|
|
CONFIG_KEYPAD == SANSA_M200_PAD || \
|
|
|
|
CONFIG_KEYPAD == SANSA_FUZE_PAD
|
2007-09-20 17:42:28 +00:00
|
|
|
{PLA_QUIT, BUTTON_POWER, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_UP, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_DOWN, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
2008-02-24 04:12:16 +00:00
|
|
|
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
|
2007-09-20 17:42:28 +00:00
|
|
|
{PLA_QUIT, BUTTON_POWER, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_FF, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_REW, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
|
|
|
|
{PLA_QUIT, BUTTON_EQ, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_MODE, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
2007-10-22 01:29:16 +00:00
|
|
|
#elif (CONFIG_KEYPAD == MROBE500_PAD)
|
|
|
|
{PLA_QUIT, BUTTON_POWER, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_RC_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_RC_MODE, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_RC_HEART, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_RC_HEART|BUTTON_REPEAT, BUTTON_NONE},
|
2008-02-24 04:12:16 +00:00
|
|
|
#elif CONFIG_KEYPAD == MROBE100_PAD
|
2008-03-18 09:24:35 +00:00
|
|
|
{PLA_QUIT, BUTTON_POWER, BUTTON_NONE},
|
2008-02-24 04:12:16 +00:00
|
|
|
{PLA_START, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
2008-01-14 22:04:48 +00:00
|
|
|
#elif (CONFIG_KEYPAD == COWOND2_PAD)
|
2008-04-15 22:35:00 +00:00
|
|
|
{PLA_QUIT, BUTTON_POWER, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_MINUS, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_CENTER, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_NONE},
|
2008-03-22 10:24:28 +00:00
|
|
|
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
|
|
|
|
{PLA_QUIT, BUTTON_RC_REC, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_RC_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_RC_MENU, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_RC_MODE, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_NONE},
|
2008-05-21 03:55:17 +00:00
|
|
|
#elif CONFIG_KEYPAD == PHILIPS_SA9200_PAD
|
|
|
|
{PLA_QUIT, BUTTON_POWER, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_RIGHT, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
2008-09-06 17:50:59 +00:00
|
|
|
#elif (CONFIG_KEYPAD == IAUDIO67_PAD)
|
|
|
|
{PLA_QUIT, BUTTON_POWER, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_MENU, BUTTON_NONE},
|
|
|
|
{PLA_FIRE, BUTTON_VOLUP, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_VOLUP|BUTTON_REPEAT, BUTTON_NONE},
|
2008-12-04 21:28:56 +00:00
|
|
|
#elif (CONFIG_KEYPAD == CREATIVEZVM_PAD)
|
|
|
|
{PLA_QUIT, BUTTON_BACK, BUTTON_NONE},
|
|
|
|
{PLA_START, BUTTON_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_MENU, BUTTON_MENU, BUTTON_NONE},
|
2008-12-08 09:51:42 +00:00
|
|
|
{PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
|
|
|
|
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
2007-09-20 17:42:28 +00:00
|
|
|
#else
|
|
|
|
#error pluginlib_actions: Unsupported keypad
|
|
|
|
#endif
|
|
|
|
{CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
|
|
|
|
};
|
|
|
|
|
2008-01-23 08:25:04 +00:00
|
|
|
const struct button_mapping generic_increase_decrease[] =
|
|
|
|
{
|
2008-08-23 09:46:38 +00:00
|
|
|
#ifdef HAVE_TOUCHSCREEN
|
2008-04-16 02:31:20 +00:00
|
|
|
{PLA_INC, BUTTON_TOPMIDDLE, BUTTON_NONE},
|
|
|
|
{PLA_DEC, BUTTON_BOTTOMMIDDLE, BUTTON_NONE},
|
|
|
|
{PLA_INC_REPEAT, BUTTON_TOPMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_DEC_REPEAT, BUTTON_BOTTOMMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#endif
|
2008-01-23 08:25:04 +00:00
|
|
|
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IRIVER_H300_PAD) \
|
2008-02-24 04:12:16 +00:00
|
|
|
|| (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \
|
2008-01-23 08:25:04 +00:00
|
|
|
|| (CONFIG_KEYPAD == GIGABEAT_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == RECORDER_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == ARCHOS_AV300_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD) \
|
2008-02-24 04:12:16 +00:00
|
|
|
|| (CONFIG_KEYPAD == ONDIO_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == GIGABEAT_S_PAD) \
|
2008-05-21 03:55:17 +00:00
|
|
|
|| (CONFIG_KEYPAD == MROBE100_PAD) \
|
2008-10-31 18:54:37 +00:00
|
|
|
|| (CONFIG_KEYPAD == PHILIPS_SA9200_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) \
|
|
|
|
|| (CONFIG_KEYPAD == SANSA_M200_PAD)
|
2008-01-23 08:25:04 +00:00
|
|
|
{PLA_INC, BUTTON_UP, BUTTON_NONE},
|
|
|
|
{PLA_DEC, BUTTON_DOWN, BUTTON_NONE},
|
|
|
|
{PLA_INC_REPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_DEC_REPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == SANSA_C200_PAD)
|
|
|
|
{PLA_INC, BUTTON_VOL_UP, BUTTON_NONE},
|
|
|
|
{PLA_DEC, BUTTON_VOL_DOWN, BUTTON_NONE},
|
|
|
|
{PLA_INC_REPEAT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_DEC_REPEAT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) \
|
|
|
|
|| (CONFIG_KEYPAD == IPOD_3G_PAD) \
|
2009-01-04 23:33:15 +00:00
|
|
|
|| (CONFIG_KEYPAD == IPOD_4G_PAD) \
|
2008-01-23 08:25:04 +00:00
|
|
|
|| (CONFIG_KEYPAD == SANSA_E200_PAD) \
|
2009-01-04 23:33:15 +00:00
|
|
|
|| (CONFIG_KEYPAD == SANSA_FUZE_PAD)
|
2008-01-23 08:25:04 +00:00
|
|
|
{PLA_INC, BUTTON_SCROLL_FWD, BUTTON_NONE},
|
|
|
|
{PLA_DEC, BUTTON_SCROLL_BACK, BUTTON_NONE},
|
|
|
|
{PLA_INC_REPEAT, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_DEC_REPEAT, BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif CONFIG_KEYPAD == PLAYER_PAD
|
|
|
|
{PLA_INC, BUTTON_STOP, BUTTON_NONE},
|
|
|
|
{PLA_DEC, BUTTON_PLAY, BUTTON_NONE},
|
2008-02-24 04:12:16 +00:00
|
|
|
#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
|
2008-01-23 08:25:04 +00:00
|
|
|
{PLA_INC, BUTTON_SCROLL_UP, BUTTON_NONE},
|
|
|
|
{PLA_DEC, BUTTON_SCROLL_DOWN, BUTTON_NONE},
|
|
|
|
{PLA_INC_REPEAT, BUTTON_SCROLL_UP|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_DEC_REPEAT, BUTTON_SCROLL_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
#elif (CONFIG_KEYPAD == MROBE500_PAD)
|
|
|
|
{PLA_INC, BUTTON_RC_PLAY, BUTTON_NONE},
|
|
|
|
{PLA_DEC, BUTTON_RC_DOWN, BUTTON_NONE},
|
|
|
|
{PLA_INC_REPEAT, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_DEC_REPEAT, BUTTON_RC_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
2008-03-22 10:24:28 +00:00
|
|
|
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
|
|
|
|
{PLA_INC, BUTTON_RC_VOL_UP, BUTTON_NONE},
|
|
|
|
{PLA_DEC, BUTTON_RC_VOL_DOWN, BUTTON_NONE},
|
|
|
|
{PLA_INC_REPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_DEC_REPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
2008-04-15 11:00:38 +00:00
|
|
|
#elif CONFIG_KEYPAD == COWOND2_PAD
|
2008-04-15 22:35:00 +00:00
|
|
|
{PLA_INC, BUTTON_PLUS, BUTTON_NONE},
|
|
|
|
{PLA_DEC, BUTTON_MINUS, BUTTON_NONE},
|
|
|
|
{PLA_INC_REPEAT, BUTTON_PLUS|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_DEC_REPEAT, BUTTON_MINUS|BUTTON_REPEAT, BUTTON_NONE},
|
2008-09-06 17:50:59 +00:00
|
|
|
#elif CONFIG_KEYPAD == IAUDIO67_PAD
|
|
|
|
{PLA_INC, BUTTON_VOLUP, BUTTON_NONE},
|
|
|
|
{PLA_DEC, BUTTON_VOLDOWN, BUTTON_NONE},
|
|
|
|
{PLA_INC_REPEAT, BUTTON_VOLUP|BUTTON_REPEAT, BUTTON_NONE},
|
|
|
|
{PLA_DEC_REPEAT, BUTTON_VOLDOWN|BUTTON_REPEAT, BUTTON_NONE},
|
2008-01-23 08:25:04 +00:00
|
|
|
#else
|
|
|
|
#error pluginlib_actions: Unsupported keypad
|
|
|
|
#endif
|
|
|
|
{CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
|
|
|
|
};
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2008-05-13 09:57:56 +00:00
|
|
|
int pluginlib_getaction(const struct plugin_api *api,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;
|
|
|
|
return api->get_custom_action(CONTEXT_CUSTOM,timeout,get_context_map);
|
|
|
|
}
|