summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233')
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c17
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/button-target.h2
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/debug-fuzeplus.c3
3 files changed, 16 insertions, 6 deletions
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c
index 3febd8fc15..47fafb6713 100644
--- a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c
+++ b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c
@@ -30,7 +30,7 @@
30 30
31#ifndef BOOTLOADER 31#ifndef BOOTLOADER
32 32
33void button_debug_screen(void) 33bool button_debug_screen(void)
34{ 34{
35 char product_id[RMI_PRODUCT_ID_LEN]; 35 char product_id[RMI_PRODUCT_ID_LEN];
36 rmi_read(RMI_PRODUCT_ID, RMI_PRODUCT_ID_LEN, product_id); 36 rmi_read(RMI_PRODUCT_ID, RMI_PRODUCT_ID_LEN, product_id);
@@ -63,9 +63,9 @@ void button_debug_screen(void)
63 report_vp.height = zone_h; 63 report_vp.height = zone_h;
64 struct viewport gesture_vp; 64 struct viewport gesture_vp;
65 memset(&gesture_vp, 0, sizeof(gesture_vp)); 65 memset(&gesture_vp, 0, sizeof(gesture_vp));
66 gesture_vp.x = 0; 66 gesture_vp.x = LCD_WIDTH / 2;
67 gesture_vp.y = zone_y - 80; 67 gesture_vp.y = zone_y - 80;
68 gesture_vp.width = LCD_WIDTH; 68 gesture_vp.width = LCD_WIDTH / 2;
69 gesture_vp.height = 80; 69 gesture_vp.height = 80;
70 70
71 while(1) 71 while(1)
@@ -165,6 +165,8 @@ void button_debug_screen(void)
165 165
166 yield(); 166 yield();
167 } 167 }
168
169 return true;
168} 170}
169 171
170struct button_area_t 172struct button_area_t
@@ -295,7 +297,14 @@ void button_init_device(void)
295 297
296 rmi_init(0x40); 298 rmi_init(0x40);
297 299
298 rmi_write_single(RMI_2D_SENSITIVITY_ADJ, 5); 300 char product_id[RMI_PRODUCT_ID_LEN];
301 rmi_read(RMI_PRODUCT_ID, RMI_PRODUCT_ID_LEN, product_id);
302 /* adjust sensitivity based on product ID like the OF */
303 if(product_id[1] > 2)
304 rmi_write_single(RMI_2D_SENSITIVITY_ADJ, 0);
305 else
306 rmi_write_single(RMI_2D_SENSITIVITY_ADJ, 13);
307
299 rmi_write_single(RMI_2D_GESTURE_SETTINGS, 308 rmi_write_single(RMI_2D_GESTURE_SETTINGS,
300 RMI_2D_GESTURE_PRESS_TIME_300MS | 309 RMI_2D_GESTURE_PRESS_TIME_300MS |
301 RMI_2D_GESTURE_FLICK_DIST_4MM << RMI_2D_GESTURE_FLICK_DIST_BP | 310 RMI_2D_GESTURE_FLICK_DIST_4MM << RMI_2D_GESTURE_FLICK_DIST_BP |
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/button-target.h b/firmware/target/arm/imx233/sansa-fuzeplus/button-target.h
index d68bc9eda4..686872d6cb 100644
--- a/firmware/target/arm/imx233/sansa-fuzeplus/button-target.h
+++ b/firmware/target/arm/imx233/sansa-fuzeplus/button-target.h
@@ -26,7 +26,7 @@
26 26
27void button_init_device(void); 27void button_init_device(void);
28int button_read_device(void); 28int button_read_device(void);
29void button_debug_screen(void); 29bool button_debug_screen(void);
30 30
31/* Main unit's buttons */ 31/* Main unit's buttons */
32#define BUTTON_POWER 0x00000001 32#define BUTTON_POWER 0x00000001
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/debug-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/debug-fuzeplus.c
index c27f28fe24..b6c096cb69 100644
--- a/firmware/target/arm/imx233/sansa-fuzeplus/debug-fuzeplus.c
+++ b/firmware/target/arm/imx233/sansa-fuzeplus/debug-fuzeplus.c
@@ -21,8 +21,9 @@
21 21
22#include "system.h" 22#include "system.h"
23#include "debug-target.h" 23#include "debug-target.h"
24#include "button-target.h"
24 25
25bool dbg_hw_target_info(void) 26bool dbg_hw_target_info(void)
26{ 27{
27 return false; 28 return button_debug_screen();
28} 29}