summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-11-17 19:13:09 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-11-17 19:13:09 +0000
commit7e211ff9d14aa732d1f54271f8a46ffc2e1b6342 (patch)
tree831430ab6fac14dd1f9eb0b9759d36da6db37502
parent1645c148e35becff9668cc541be5c850153370eb (diff)
downloadrockbox-7e211ff9d14aa732d1f54271f8a46ffc2e1b6342.zip
rockbox-7e211ff9d14aa732d1f54271f8a46ffc2e1b6342.tar.gz
rockbox-7e211ff9d14aa732d1f54271f8a46ffc2e1b6342.tar.bz2
rockbox-7e211ff9d14aa732d1f54271f8a46ffc2e1b6342.tar.xz
fuze+: adjust touchpad sensitivity based on product id like OF, add debug screen to hw info
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31010 a1c6a512-1295-4272-9138-f99709370657
-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 3febd8f..47fafb6 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 @@
#ifndef BOOTLOADER
-void button_debug_screen(void)
+bool button_debug_screen(void)
{
char product_id[RMI_PRODUCT_ID_LEN];
rmi_read(RMI_PRODUCT_ID, RMI_PRODUCT_ID_LEN, product_id);
@@ -63,9 +63,9 @@ void button_debug_screen(void)
report_vp.height = zone_h;
struct viewport gesture_vp;
memset(&gesture_vp, 0, sizeof(gesture_vp));
- gesture_vp.x = 0;
+ gesture_vp.x = LCD_WIDTH / 2;
gesture_vp.y = zone_y - 80;
- gesture_vp.width = LCD_WIDTH;
+ gesture_vp.width = LCD_WIDTH / 2;
gesture_vp.height = 80;
while(1)
@@ -165,6 +165,8 @@ void button_debug_screen(void)
yield();
}
+
+ return true;
}
struct button_area_t
@@ -295,7 +297,14 @@ void button_init_device(void)
rmi_init(0x40);
- rmi_write_single(RMI_2D_SENSITIVITY_ADJ, 5);
+ char product_id[RMI_PRODUCT_ID_LEN];
+ rmi_read(RMI_PRODUCT_ID, RMI_PRODUCT_ID_LEN, product_id);
+ /* adjust sensitivity based on product ID like the OF */
+ if(product_id[1] > 2)
+ rmi_write_single(RMI_2D_SENSITIVITY_ADJ, 0);
+ else
+ rmi_write_single(RMI_2D_SENSITIVITY_ADJ, 13);
+
rmi_write_single(RMI_2D_GESTURE_SETTINGS,
RMI_2D_GESTURE_PRESS_TIME_300MS |
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 d68bc9e..686872d 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 @@
void button_init_device(void);
int button_read_device(void);
-void button_debug_screen(void);
+bool button_debug_screen(void);
/* Main unit's buttons */
#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 c27f28f..b6c096c 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 @@
#include "system.h"
#include "debug-target.h"
+#include "button-target.h"
bool dbg_hw_target_info(void)
{
- return false;
+ return button_debug_screen();
}