diff options
Diffstat (limited to 'firmware/target/arm/tms320dm320/mrobe-500')
-rw-r--r-- | firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c | 18 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/mrobe-500/button-target.h | 8 |
2 files changed, 13 insertions, 13 deletions
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 @@ | |||
42 | static short last_x, last_y, last_z1, last_z2; /* for the touch screen */ | 42 | static short last_x, last_y, last_z1, last_z2; /* for the touch screen */ |
43 | static bool touch_available = false; | 43 | static bool touch_available = false; |
44 | 44 | ||
45 | static enum touchpad_mode current_mode = TOUCHPAD_POINT; | 45 | static enum touchscreen_mode current_mode = TOUCHSCREEN_POINT; |
46 | static int touchpad_buttons[3][3] = { | 46 | static int touchscreen_buttons[3][3] = { |
47 | {BUTTON_TOPLEFT, BUTTON_TOPMIDDLE, BUTTON_TOPRIGHT}, | 47 | {BUTTON_TOPLEFT, BUTTON_TOPMIDDLE, BUTTON_TOPRIGHT}, |
48 | {BUTTON_MIDLEFT, BUTTON_CENTER, BUTTON_MIDRIGHT}, | 48 | {BUTTON_MIDLEFT, BUTTON_CENTER, BUTTON_MIDRIGHT}, |
49 | {BUTTON_BOTTOMLEFT, BUTTON_BOTTOMMIDDLE, BUTTON_BOTTOMRIGHT}, | 49 | {BUTTON_BOTTOMLEFT, BUTTON_BOTTOMMIDDLE, BUTTON_BOTTOMRIGHT}, |
50 | }; | 50 | }; |
51 | 51 | ||
52 | void touchpad_set_mode(enum touchpad_mode mode) | 52 | void touchscreen_set_mode(enum touchscreen_mode mode) |
53 | { | 53 | { |
54 | current_mode = mode; | 54 | current_mode = mode; |
55 | } | 55 | } |
56 | enum touchpad_mode touchpad_get_mode(void) | 56 | enum touchscreen_mode touchscreen_get_mode(void) |
57 | { | 57 | { |
58 | return current_mode; | 58 | return current_mode; |
59 | } | 59 | } |
@@ -185,13 +185,13 @@ int button_read_device(int *data) | |||
185 | *data = touch_to_pixels(x, y); | 185 | *data = touch_to_pixels(x, y); |
186 | switch (current_mode) | 186 | switch (current_mode) |
187 | { | 187 | { |
188 | case TOUCHPAD_POINT: | 188 | case TOUCHSCREEN_POINT: |
189 | r_button |= BUTTON_TOUCHPAD; | 189 | r_button |= BUTTON_TOUCHSCREEN; |
190 | break; | 190 | break; |
191 | case TOUCHPAD_BUTTON: | 191 | case TOUCHSCREEN_BUTTON: |
192 | { | 192 | { |
193 | int px_x = ((*data&0xffff0000)>>16), px_y = ((*data&0x0000ffff)); | 193 | int px_x = ((*data&0xffff0000)>>16), px_y = ((*data&0x0000ffff)); |
194 | r_button |= touchpad_buttons[px_y/(LCD_HEIGHT/3)][px_x/(LCD_WIDTH/3)]; | 194 | r_button |= touchscreen_buttons[px_y/(LCD_HEIGHT/3)][px_x/(LCD_WIDTH/3)]; |
195 | oldbutton = r_button; | 195 | oldbutton = r_button; |
196 | break; | 196 | break; |
197 | } | 197 | } |
@@ -233,7 +233,7 @@ int button_read_device(int *data) | |||
233 | return r_button; | 233 | return r_button; |
234 | } | 234 | } |
235 | 235 | ||
236 | /* Touchpad data available interupt */ | 236 | /* Touchscreen data available interupt */ |
237 | void read_battery_inputs(void); | 237 | void read_battery_inputs(void); |
238 | void GIO14(void) | 238 | void GIO14(void) |
239 | { | 239 | { |
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); | |||
33 | struct touch_calibration_point { | 33 | struct touch_calibration_point { |
34 | short px_x; /* known pixel value */ | 34 | short px_x; /* known pixel value */ |
35 | short px_y; | 35 | short px_y; |
36 | short val_x; /* touchpad value at the known pixel */ | 36 | short val_x; /* touchscreen value at the known pixel */ |
37 | short val_y; | 37 | short val_y; |
38 | }; | 38 | }; |
39 | void use_calibration(bool enable); | 39 | void use_calibration(bool enable); |
@@ -55,7 +55,7 @@ void use_calibration(bool enable); | |||
55 | 55 | ||
56 | #define BUTTON_TOUCH 0x00000200 | 56 | #define BUTTON_TOUCH 0x00000200 |
57 | 57 | ||
58 | /* Touchpad Screen Area Buttons */ | 58 | /* Touch Screen Area Buttons */ |
59 | #define BUTTON_TOPLEFT 0x00004000 | 59 | #define BUTTON_TOPLEFT 0x00004000 |
60 | #define BUTTON_TOPMIDDLE 0x00008000 | 60 | #define BUTTON_TOPMIDDLE 0x00008000 |
61 | #define BUTTON_TOPRIGHT 0x00010000 | 61 | #define BUTTON_TOPRIGHT 0x00010000 |
@@ -67,8 +67,8 @@ void use_calibration(bool enable); | |||
67 | #define BUTTON_BOTTOMRIGHT 0x00400000 | 67 | #define BUTTON_BOTTOMRIGHT 0x00400000 |
68 | 68 | ||
69 | /* compatibility hacks | 69 | /* compatibility hacks |
70 | not mapped to the touchpad button areas because | 70 | not mapped to the touchscreen button areas because |
71 | the touchpad is not always in that mode */ | 71 | the touchscreen is not always in that mode */ |
72 | #define BUTTON_LEFT BUTTON_RC_REW | 72 | #define BUTTON_LEFT BUTTON_RC_REW |
73 | #define BUTTON_RIGHT BUTTON_RC_FF | 73 | #define BUTTON_RIGHT BUTTON_RC_FF |
74 | 74 | ||