summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-08-23 09:46:38 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-08-23 09:46:38 +0000
commit1392dc2144a4b1810ba5c421f54e05dc1a3a74c7 (patch)
tree7f7f7d6dd6ce00e8146896456549441d4e8153d7 /firmware/target/arm
parent965d2af61f5035dcf5179b8539785de641a9f015 (diff)
downloadrockbox-1392dc2144a4b1810ba5c421f54e05dc1a3a74c7.tar.gz
rockbox-1392dc2144a4b1810ba5c421f54e05dc1a3a74c7.zip
Commit FS#9308: differentiate between TOUCHPAD & TOUCHSCREEN
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18338 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/tcc780x/cowond2/button-cowond2.c22
-rw-r--r--firmware/target/arm/tcc780x/cowond2/button-target.h2
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c18
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/button-target.h8
4 files changed, 25 insertions, 25 deletions
diff --git a/firmware/target/arm/tcc780x/cowond2/button-cowond2.c b/firmware/target/arm/tcc780x/cowond2/button-cowond2.c
index 0da55e3f0a..9449bcdf30 100644
--- a/firmware/target/arm/tcc780x/cowond2/button-cowond2.c
+++ b/firmware/target/arm/tcc780x/cowond2/button-cowond2.c
@@ -28,24 +28,24 @@
#define TOUCH_MARGIN 8
-static enum touchpad_mode current_mode = TOUCHPAD_POINT;
+static enum touchscreen_mode current_mode = TOUCHSCREEN_POINT;
static short last_x, last_y;
static bool touch_available = false;
-static int touchpad_buttons[3][3] =
+static int touchscreen_buttons[3][3] =
{
{BUTTON_TOPLEFT, BUTTON_TOPMIDDLE, BUTTON_TOPRIGHT},
{BUTTON_MIDLEFT, BUTTON_CENTER, BUTTON_MIDRIGHT},
{BUTTON_BOTTOMLEFT, BUTTON_BOTTOMMIDDLE, BUTTON_BOTTOMRIGHT},
};
-void touchpad_set_mode(enum touchpad_mode mode)
+void touchscreen_set_mode(enum touchscreen_mode mode)
{
current_mode = mode;
}
-enum touchpad_mode touchpad_get_mode(void)
+enum touchscreen_mode touchscreen_get_mode(void)
{
return current_mode;
}
@@ -58,7 +58,7 @@ void button_set_touch_available(void)
struct touch_calibration_point {
short px_x; /* known pixel value */
short px_y;
- short val_x; /* touchpad value at the known pixel */
+ short val_x; /* touchscreen value at the known pixel */
short val_y;
};
@@ -188,15 +188,15 @@ int button_read_device(int *data)
*data = touch_to_pixels(x, y);
switch (current_mode)
{
- case TOUCHPAD_POINT:
- btn |= BUTTON_TOUCHPAD;
+ case TOUCHSCREEN_POINT:
+ btn |= BUTTON_TOUCHSCREEN;
break;
- case TOUCHPAD_BUTTON:
+ case TOUCHSCREEN_BUTTON:
{
int px_x = (*data&0xffff0000)>>16;
int px_y = (*data&0x0000ffff);
- btn |= touchpad_buttons[px_y/(LCD_HEIGHT/3)]
- [px_x/(LCD_WIDTH/3)];
+ btn |= touchscreen_buttons[px_y/(LCD_HEIGHT/3)]
+ [px_x/(LCD_WIDTH/3)];
break;
}
}
@@ -208,7 +208,7 @@ int button_read_device(int *data)
if (!(GPIOA & 0x4))
btn |= BUTTON_POWER;
- if(btn & BUTTON_TOUCHPAD && !is_backlight_on(true))
+ if(btn & BUTTON_TOUCHSCREEN && !is_backlight_on(true))
*data = 0;
return btn;
diff --git a/firmware/target/arm/tcc780x/cowond2/button-target.h b/firmware/target/arm/tcc780x/cowond2/button-target.h
index d315d0172f..faf660fc71 100644
--- a/firmware/target/arm/tcc780x/cowond2/button-target.h
+++ b/firmware/target/arm/tcc780x/cowond2/button-target.h
@@ -44,7 +44,7 @@ void button_set_touch_available(void);
#define BUTTON_UP BUTTON_TOPMIDDLE
#define BUTTON_DOWN BUTTON_BOTTOMMIDDLE
-/* Touchpad Screen Area Buttons */
+/* Touch Screen Area Buttons */
#define BUTTON_TOPLEFT 0x00000010
#define BUTTON_TOPMIDDLE 0x00000020
#define BUTTON_TOPRIGHT 0x00000040
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c
index 26136ce59b..ba2cedb76c 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c
@@ -42,18 +42,18 @@
static short last_x, last_y, last_z1, last_z2; /* for the touch screen */
static bool touch_available = false;
-static enum touchpad_mode current_mode = TOUCHPAD_POINT;
-static int touchpad_buttons[3][3] = {
+static enum touchscreen_mode current_mode = TOUCHSCREEN_POINT;
+static int touchscreen_buttons[3][3] = {
{BUTTON_TOPLEFT, BUTTON_TOPMIDDLE, BUTTON_TOPRIGHT},
{BUTTON_MIDLEFT, BUTTON_CENTER, BUTTON_MIDRIGHT},
{BUTTON_BOTTOMLEFT, BUTTON_BOTTOMMIDDLE, BUTTON_BOTTOMRIGHT},
};
-void touchpad_set_mode(enum touchpad_mode mode)
+void touchscreen_set_mode(enum touchscreen_mode mode)
{
current_mode = mode;
}
-enum touchpad_mode touchpad_get_mode(void)
+enum touchscreen_mode touchscreen_get_mode(void)
{
return current_mode;
}
@@ -185,13 +185,13 @@ int button_read_device(int *data)
*data = touch_to_pixels(x, y);
switch (current_mode)
{
- case TOUCHPAD_POINT:
- r_button |= BUTTON_TOUCHPAD;
+ case TOUCHSCREEN_POINT:
+ r_button |= BUTTON_TOUCHSCREEN;
break;
- case TOUCHPAD_BUTTON:
+ case TOUCHSCREEN_BUTTON:
{
int px_x = ((*data&0xffff0000)>>16), px_y = ((*data&0x0000ffff));
- r_button |= touchpad_buttons[px_y/(LCD_HEIGHT/3)][px_x/(LCD_WIDTH/3)];
+ r_button |= touchscreen_buttons[px_y/(LCD_HEIGHT/3)][px_x/(LCD_WIDTH/3)];
oldbutton = r_button;
break;
}
@@ -233,7 +233,7 @@ int button_read_device(int *data)
return r_button;
}
-/* Touchpad data available interupt */
+/* Touchscreen data available interupt */
void read_battery_inputs(void);
void GIO14(void)
{
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/button-target.h b/firmware/target/arm/tms320dm320/mrobe-500/button-target.h
index 30cc55dada..5b888b3e0a 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/button-target.h
+++ b/firmware/target/arm/tms320dm320/mrobe-500/button-target.h
@@ -33,7 +33,7 @@ int button_read_device(int *data);
struct touch_calibration_point {
short px_x; /* known pixel value */
short px_y;
- short val_x; /* touchpad value at the known pixel */
+ short val_x; /* touchscreen value at the known pixel */
short val_y;
};
void use_calibration(bool enable);
@@ -55,7 +55,7 @@ void use_calibration(bool enable);
#define BUTTON_TOUCH 0x00000200
-/* Touchpad Screen Area Buttons */
+/* Touch Screen Area Buttons */
#define BUTTON_TOPLEFT 0x00004000
#define BUTTON_TOPMIDDLE 0x00008000
#define BUTTON_TOPRIGHT 0x00010000
@@ -67,8 +67,8 @@ void use_calibration(bool enable);
#define BUTTON_BOTTOMRIGHT 0x00400000
/* compatibility hacks
- not mapped to the touchpad button areas because
- the touchpad is not always in that mode */
+ not mapped to the touchscreen button areas because
+ the touchscreen is not always in that mode */
#define BUTTON_LEFT BUTTON_RC_REW
#define BUTTON_RIGHT BUTTON_RC_FF