aboutsummaryrefslogtreecommitdiffstats
path: root/touchpad.h
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-07-18 03:42:05 +0200
committerTectu <joel@unormal.org>2012-07-18 03:42:05 +0200
commit096701a6ad8f2ba5512aff4ee430ca0d626fff7a (patch)
tree647c32fb1ffbcc895b4b1ffa119c8c3ee88f9948 /touchpad.h
parent24692be747aa4d94e264219d6f18bcc6beec76ff (diff)
downloaduGFX-096701a6ad8f2ba5512aff4ee430ca0d626fff7a.tar.gz
uGFX-096701a6ad8f2ba5512aff4ee430ca0d626fff7a.tar.bz2
uGFX-096701a6ad8f2ba5512aff4ee430ca0d626fff7a.zip
restructorizing
Diffstat (limited to 'touchpad.h')
-rw-r--r--touchpad.h88
1 files changed, 0 insertions, 88 deletions
diff --git a/touchpad.h b/touchpad.h
deleted file mode 100644
index c401415e..00000000
--- a/touchpad.h
+++ /dev/null
@@ -1,88 +0,0 @@
-#ifndef TOUCHPAD_H
-#define TOUCHPAD_H
-
-#include "ch.h"
-#include "hal.h"
-#include "glcd.h"
-#include "ads7843_lld.h"
-#include "xpt2046_lld.h"
-
-#define CONVERSIONS 3
-
-#define TP_CS_HIGH palSetPad(TP_CS_PORT, TP_CS)
-#define TP_CS_LOW palClearPad(TP_CS_PORT, TP_CS)
-
-struct cal {
- float xm;
- float ym;
- float xn;
- float yn;
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*
- * Description: initializes touchpad (SPI)
- *
- * param: SPI driver
- *
- * return: none
- */
-void tpInit(SPIDriver *spip);
-
-/*
- * Description: reads out PEN_IRQ from touchpad controller
- *
- * param: none
- *
- * return: 1 = touchpad pressed / 0 = touchpad not pressed
- */
-uint8_t tpIRQ(void);
-
-/*
- * Description: reads-out X coordinate, calibrated
- *
- * param: none
- *
- * return: X coordinate, relative to screen zero-point
- */
-uint16_t tpReadX(void);
-
-/*
- * Description: reads-out Y coordinate, calibrated
- *
- * param: none
- *
- * return: Y coordinate, relative to screen zero-point
- */
-uint16_t tpReadY(void);
-
-/*
- * Description: reads-out Z value / pressure
- * only available when controller supports, returns
- * zero otherwise.
- *
- * param: none
- *
- * return: pressure on the touchpad
- */
-uint16_t tpReadZ(void);
-
-/*
- * Description: calibration routine
- *
- * param: none
- *
- * return: none
- */
-void tpCalibrate(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-