mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-10 05:32:40 -05:00
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
This commit is contained in:
parent
1645c148e3
commit
7e211ff9d1
3 changed files with 16 additions and 6 deletions
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#ifndef BOOTLOADER
|
#ifndef BOOTLOADER
|
||||||
|
|
||||||
void button_debug_screen(void)
|
bool button_debug_screen(void)
|
||||||
{
|
{
|
||||||
char product_id[RMI_PRODUCT_ID_LEN];
|
char product_id[RMI_PRODUCT_ID_LEN];
|
||||||
rmi_read(RMI_PRODUCT_ID, RMI_PRODUCT_ID_LEN, product_id);
|
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;
|
report_vp.height = zone_h;
|
||||||
struct viewport gesture_vp;
|
struct viewport gesture_vp;
|
||||||
memset(&gesture_vp, 0, sizeof(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.y = zone_y - 80;
|
||||||
gesture_vp.width = LCD_WIDTH;
|
gesture_vp.width = LCD_WIDTH / 2;
|
||||||
gesture_vp.height = 80;
|
gesture_vp.height = 80;
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
|
|
@ -165,6 +165,8 @@ void button_debug_screen(void)
|
||||||
|
|
||||||
yield();
|
yield();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct button_area_t
|
struct button_area_t
|
||||||
|
|
@ -295,7 +297,14 @@ void button_init_device(void)
|
||||||
|
|
||||||
rmi_init(0x40);
|
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_write_single(RMI_2D_GESTURE_SETTINGS,
|
||||||
RMI_2D_GESTURE_PRESS_TIME_300MS |
|
RMI_2D_GESTURE_PRESS_TIME_300MS |
|
||||||
RMI_2D_GESTURE_FLICK_DIST_4MM << RMI_2D_GESTURE_FLICK_DIST_BP |
|
RMI_2D_GESTURE_FLICK_DIST_4MM << RMI_2D_GESTURE_FLICK_DIST_BP |
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
void button_init_device(void);
|
void button_init_device(void);
|
||||||
int button_read_device(void);
|
int button_read_device(void);
|
||||||
void button_debug_screen(void);
|
bool button_debug_screen(void);
|
||||||
|
|
||||||
/* Main unit's buttons */
|
/* Main unit's buttons */
|
||||||
#define BUTTON_POWER 0x00000001
|
#define BUTTON_POWER 0x00000001
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,9 @@
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "debug-target.h"
|
#include "debug-target.h"
|
||||||
|
#include "button-target.h"
|
||||||
|
|
||||||
bool dbg_hw_target_info(void)
|
bool dbg_hw_target_info(void)
|
||||||
{
|
{
|
||||||
return false;
|
return button_debug_screen();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue