summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-11-20 19:05:16 +0000
committerAidan MacDonald <amachronic@protonmail.com>2021-11-24 18:49:03 -0500
commit44acbc66291da6a8ade8571b73a10e34341a622b (patch)
tree226f9d9f971756f481455da082443f700bcfc786 /firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c
parentb39acee3abd199d80b84c68ebfa7301b7e7a957e (diff)
downloadrockbox-44acbc66291da6a8ade8571b73a10e34341a622b.tar.gz
rockbox-44acbc66291da6a8ade8571b73a10e34341a622b.zip
Shanling Q1: enable multi-touch reporting
The FT6x06 driver used for the Shanling Q1's touchscreen has been extended to report more than one touch point. It can also return the gesture detected by the controller, but this doesn't seem to report anything useful on the Q1. Multi-touch is only useful in 3x3 grid mode since the Rockbox button API cannot report more than one touch point. The FiiO M3K uses the same driver so it's been updated to the multi-touch API, but functionality is unchanged. Change-Id: I4de42f44808d6eb902e3da212d8f936b7a5042c7
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c')
-rw-r--r--firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c b/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c
index 04e3102d42..24daf2ef69 100644
--- a/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c
+++ b/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c
@@ -318,7 +318,7 @@ static void ft_step_state(uint32_t t, int evt, int tx, int ty)
318 } 318 }
319} 319}
320 320
321static void ft_event_cb(int evt, int tx, int ty) 321static void ft_event_cb(struct ft6x06_state* state)
322{ 322{
323 /* TODO: convert the touch positions to linear positions. 323 /* TODO: convert the touch positions to linear positions.
324 * 324 *
@@ -327,7 +327,8 @@ static void ft_event_cb(int evt, int tx, int ty)
327 * the middle of the touchpad than on the edges, so scrolling feels slow 327 * the middle of the touchpad than on the edges, so scrolling feels slow
328 * in the middle and faster near the edge. 328 * in the middle and faster near the edge.
329 */ 329 */
330 ft_step_state(__ost_read32(), evt, tx, ty); 330 struct ft6x06_point* pt = &state->points[0];
331 ft_step_state(__ost_read32(), pt->event, pt->pos_x, pt->pos_y);
331} 332}
332 333
333static void ft_init(void) 334static void ft_init(void)