aboutsummaryrefslogtreecommitdiffstats
path: root/touchpad.h
diff options
context:
space:
mode:
Diffstat (limited to 'touchpad.h')
-rw-r--r--touchpad.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/touchpad.h b/touchpad.h
index c69a5af0..927c3a91 100644
--- a/touchpad.h
+++ b/touchpad.h
@@ -8,10 +8,19 @@
#define SET_CS(a) (TP_PORT->BSRR = 1 << (TP_CS + (a ? 0 : 16)))
+volatile struct cal {
+ int16_t xm;
+ int16_t ym;
+ int16_t xn;
+ int16_t yn;
+};
+
void tpInit(void);
uint8_t tpIRQ(void);
uint16_t tpReadX(void);
uint16_t tpReadY(void);
+void tpCalibrate(void);
+void tpCalibrate2(void);
void tpDrawCross(uint16_t x, uint16_t y);
#endif