diff options
author | Tectu <joel@unormal.org> | 2012-11-08 14:35:30 -0800 |
---|---|---|
committer | Tectu <joel@unormal.org> | 2012-11-08 14:35:30 -0800 |
commit | 3dd0b1a5af27fbc9a645f71616892977410bca1c (patch) | |
tree | 46bad119958e99a9fbea96f4ce19e5abf3b2d80a /include | |
parent | 9592a878267ff16aaf7f7439b1448aac05fde4c2 (diff) | |
parent | f75a2ae91e81eec8fcb7159b485e6a79e70121fa (diff) | |
download | uGFX-3dd0b1a5af27fbc9a645f71616892977410bca1c.tar.gz uGFX-3dd0b1a5af27fbc9a645f71616892977410bca1c.tar.bz2 uGFX-3dd0b1a5af27fbc9a645f71616892977410bca1c.zip |
Merge pull request #13 from abhishek-kakkar/master
Touchscreen 3 point calibration support
Diffstat (limited to 'include')
-rw-r--r-- | include/touchpad.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/include/touchpad.h b/include/touchpad.h index 63d6cbf7..ec0ef049 100644 --- a/include/touchpad.h +++ b/include/touchpad.h @@ -49,6 +49,9 @@ /* Include the low level driver information */ #include "touchpad_lld.h" +/* For definitions of coord_t, we require gdisp.h */ +#include "gdisp.h" + /*===========================================================================*/ /* Type definitions */ /*===========================================================================*/ @@ -57,10 +60,12 @@ * @brief Struct used for calibration */ typedef struct cal_t { - float xm; - float ym; - float xn; - float yn; + float ax; + float bx; + float cx; + float ay; + float by; + float cy; } cal_t; /*===========================================================================*/ @@ -72,12 +77,12 @@ extern "C" { #endif void tpInit(const TOUCHPADDriver *tp); -uint16_t tpReadX(void); -uint16_t tpReadY(void); +coord_t tpReadX(void); +coord_t tpReadY(void); void tpCalibrate(void); #if TOUCHPAD_HAS_IRQ - uint8_t tpIRQ(void); + bool_t tpIRQ(void); #endif #if TOUCHPAD_HAS_PRESSURE |