summaryrefslogtreecommitdiff
path: root/firmware/export/ft6x06.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/ft6x06.h')
-rw-r--r--firmware/export/ft6x06.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/firmware/export/ft6x06.h b/firmware/export/ft6x06.h
index de1fdd0979..6596f89272 100644
--- a/firmware/export/ft6x06.h
+++ b/firmware/export/ft6x06.h
@@ -25,23 +25,32 @@
25#include "config.h" 25#include "config.h"
26#include <stdbool.h> 26#include <stdbool.h>
27 27
28typedef void(*ft6x06_event_cb)(int, int, int); 28enum ft6x06_event {
29 FT6x06_EVT_NONE = -1,
30 FT6x06_EVT_PRESS = 0,
31 FT6x06_EVT_RELEASE = 1,
32 FT6x06_EVT_CONTACT = 2,
33};
29 34
30struct ft6x06_state { 35struct ft6x06_point {
31 int event; 36 int event;
37 int touch_id;
32 int pos_x; 38 int pos_x;
33 int pos_y; 39 int pos_y;
40 int weight;
41 int area;
34}; 42};
35 43
36enum ft6x06_event { 44struct ft6x06_state {
37 FT6x06_EVT_NONE = -1, 45 int gesture;
38 FT6x06_EVT_PRESS = 0, 46 int nr_points;
39 FT6x06_EVT_RELEASE = 1, 47 struct ft6x06_point points[FT6x06_NUM_POINTS];
40 FT6x06_EVT_CONTACT = 2,
41}; 48};
42 49
43extern struct ft6x06_state ft6x06_state; 50extern struct ft6x06_state ft6x06_state;
44 51
52typedef void(*ft6x06_event_cb)(struct ft6x06_state* state);
53
45void ft6x06_init(void); 54void ft6x06_init(void);
46void ft6x06_set_event_cb(ft6x06_event_cb fn); 55void ft6x06_set_event_cb(ft6x06_event_cb fn);
47void ft6x06_enable(bool en); 56void ft6x06_enable(bool en);