mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-17 09:02:38 -05:00
add separate button defines for the Gigabeat remote control
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13442 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4c486ce948
commit
0037a1b648
3 changed files with 73 additions and 11 deletions
|
|
@ -32,15 +32,15 @@ static bool hold_button = false;
|
|||
|
||||
static int const remote_buttons[] =
|
||||
{
|
||||
BUTTON_NONE, /* Headphones connected - remote disconnected */
|
||||
BUTTON_SELECT,
|
||||
BUTTON_MENU, /* could be changed to BUTTON_A */
|
||||
BUTTON_LEFT,
|
||||
BUTTON_RIGHT,
|
||||
BUTTON_UP, /* could be changed to BUTTON_VOL_UP */
|
||||
BUTTON_DOWN, /* could be changed to BUTTON_VOL_DOWN */
|
||||
BUTTON_NONE, /* Remote control attached - no buttons pressed */
|
||||
BUTTON_NONE, /* Nothing in the headphone socket */
|
||||
BUTTON_NONE, /* Headphones connected - remote disconnected */
|
||||
BUTTON_RC_PLAY,
|
||||
BUTTON_RC_DSP,
|
||||
BUTTON_RC_REW,
|
||||
BUTTON_RC_FF,
|
||||
BUTTON_RC_VOL_UP,
|
||||
BUTTON_RC_VOL_DOWN,
|
||||
BUTTON_NONE, /* Remote control attached - no buttons pressed */
|
||||
BUTTON_NONE, /* Nothing in the headphone socket */
|
||||
};
|
||||
|
||||
void button_init_device(void)
|
||||
|
|
|
|||
|
|
@ -44,6 +44,15 @@ int button_read_device(void);
|
|||
#define BUTTON_SELECT 0x00000100
|
||||
#define BUTTON_A 0x00000200
|
||||
|
||||
/* Remote control buttons */
|
||||
|
||||
#define BUTTON_RC_VOL_UP 0x00000400
|
||||
#define BUTTON_RC_VOL_DOWN 0x00000800
|
||||
#define BUTTON_RC_FF 0x00001000
|
||||
#define BUTTON_RC_REW 0x00002000
|
||||
|
||||
#define BUTTON_RC_PLAY 0x00004000
|
||||
#define BUTTON_RC_DSP 0x00008000
|
||||
|
||||
/* Toshiba Gigabeat specific remote button ADC values */
|
||||
/* The remote control uses ADC 1 to emulate button pushes
|
||||
|
|
@ -80,8 +89,8 @@ int button_read_device(void);
|
|||
|BUTTON_UP|BUTTON_DOWN|BUTTON_VOL_UP|BUTTON_VOL_DOWN\
|
||||
|BUTTON_SELECT|BUTTON_A)
|
||||
|
||||
|
||||
#define BUTTON_REMOTE 0
|
||||
#define BUTTON_REMOTE (BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN|BUTTON_RC_FF\
|
||||
|BUTTON_RC_REW|BUTTON_RC_PLAY|BUTTON_RC_DSP)
|
||||
|
||||
#define POWEROFF_BUTTON BUTTON_POWER
|
||||
#define POWEROFF_COUNT 10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue