2007-09-20 04:46:41 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
2007-09-22 15:43:38 +00:00
|
|
|
* $Id$
|
2007-09-20 04:46:41 +00:00
|
|
|
*
|
2007-09-20 08:42:06 +00:00
|
|
|
* Copyright (C) 2007 by Jonathan Gordon
|
2007-09-20 04:46:41 +00:00
|
|
|
*
|
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.
|
2007-09-20 04:46:41 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _BUTTON_TARGET_H_
|
|
|
|
#define _BUTTON_TARGET_H_
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#define HAS_BUTTON_HOLD
|
|
|
|
|
|
|
|
bool button_hold(void);
|
|
|
|
void button_init_device(void);
|
2007-10-22 07:01:59 +00:00
|
|
|
int button_read_device(int *data);
|
2007-09-20 04:46:41 +00:00
|
|
|
|
2007-10-01 07:52:39 +00:00
|
|
|
struct touch_calibration_point {
|
|
|
|
short px_x; /* known pixel value */
|
|
|
|
short px_y;
|
2008-08-23 09:46:38 +00:00
|
|
|
short val_x; /* touchscreen value at the known pixel */
|
2007-10-01 07:52:39 +00:00
|
|
|
short val_y;
|
|
|
|
};
|
|
|
|
void use_calibration(bool enable);
|
|
|
|
|
2007-11-10 22:12:54 +00:00
|
|
|
/* M:Robe 500 specific button codes */
|
2007-09-20 04:46:41 +00:00
|
|
|
|
2007-11-10 22:12:54 +00:00
|
|
|
#define BUTTON_POWER 0x00000100
|
2007-09-20 04:46:41 +00:00
|
|
|
|
|
|
|
/* Remote control buttons */
|
|
|
|
|
2007-11-10 22:12:54 +00:00
|
|
|
#define BUTTON_RC_PLAY 0x00000001
|
|
|
|
#define BUTTON_RC_DOWN 0x00000002
|
|
|
|
#define BUTTON_RC_FF 0x00000004
|
|
|
|
#define BUTTON_RC_REW 0x00000008
|
2007-09-20 08:42:06 +00:00
|
|
|
#define BUTTON_RC_VOL_UP 0x00000010
|
2007-11-10 22:12:54 +00:00
|
|
|
#define BUTTON_RC_VOL_DOWN 0x00000020
|
|
|
|
#define BUTTON_RC_MODE 0x00000040
|
|
|
|
#define BUTTON_RC_HEART 0x00000080
|
2007-09-20 04:46:41 +00:00
|
|
|
|
2007-09-20 08:42:06 +00:00
|
|
|
#define BUTTON_TOUCH 0x00000200
|
2007-09-20 04:46:41 +00:00
|
|
|
|
2008-08-23 09:46:38 +00:00
|
|
|
/* Touch Screen Area Buttons */
|
2008-04-15 10:35:11 +00:00
|
|
|
#define BUTTON_TOPLEFT 0x00004000
|
|
|
|
#define BUTTON_TOPMIDDLE 0x00008000
|
|
|
|
#define BUTTON_TOPRIGHT 0x00010000
|
|
|
|
#define BUTTON_MIDLEFT 0x00020000
|
|
|
|
#define BUTTON_CENTER 0x00040000
|
|
|
|
#define BUTTON_MIDRIGHT 0x00080000
|
|
|
|
#define BUTTON_BOTTOMLEFT 0x00100000
|
|
|
|
#define BUTTON_BOTTOMMIDDLE 0x00200000
|
|
|
|
#define BUTTON_BOTTOMRIGHT 0x00400000
|
|
|
|
|
|
|
|
/* compatibility hacks
|
2008-08-23 09:46:38 +00:00
|
|
|
not mapped to the touchscreen button areas because
|
|
|
|
the touchscreen is not always in that mode */
|
2007-09-20 08:42:06 +00:00
|
|
|
#define BUTTON_LEFT BUTTON_RC_REW
|
|
|
|
#define BUTTON_RIGHT BUTTON_RC_FF
|
2007-10-18 12:15:56 +00:00
|
|
|
|
2007-09-20 08:42:06 +00:00
|
|
|
#define POWEROFF_BUTTON BUTTON_POWER
|
2007-10-18 12:15:56 +00:00
|
|
|
#define POWEROFF_COUNT 10
|
2007-09-20 04:46:41 +00:00
|
|
|
|
2008-04-15 10:35:11 +00:00
|
|
|
#define BUTTON_MAIN (BUTTON_POWER| \
|
|
|
|
BUTTON_TOPLEFT|BUTTON_TOPMIDDLE|BUTTON_TOPRIGHT \
|
|
|
|
BUTTON_MIDLEFT|BUTTON_CENTER|BUTTON_MIDRIGHT \
|
|
|
|
BUTTON_BOTTOMLEFT|BUTTON_BOTTOMMIDDLE|BUTTON_BOTTOMRIGHT)
|
2007-09-20 04:46:41 +00:00
|
|
|
|
2007-09-20 08:42:06 +00:00
|
|
|
#define BUTTON_REMOTE (BUTTON_RC_HEART|BUTTON_RC_MODE| \
|
|
|
|
BUTTON_RC_VOL_DOWN|BUTTON_RC_VOL_UP| \
|
|
|
|
BUTTON_RC_PLAY|BUTTON_RC_DOWN| \
|
|
|
|
BUTTON_RC_REW|BUTTON_RC_FF)
|
2007-09-20 04:46:41 +00:00
|
|
|
|
|
|
|
#endif /* _BUTTON_TARGET_H_ */
|