diff options
author | Joel Bodenmann <joel@unormal.org> | 2012-11-10 17:04:20 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2012-11-10 17:04:20 +0100 |
commit | 5f903622616a2f1686f3124bf56dd69479fd9454 (patch) | |
tree | 631fca189b82e1aab6d669534c846003ecd0575e /src | |
parent | 8231e9738c20bd676943638830fedeb71ca1195d (diff) | |
download | uGFX-5f903622616a2f1686f3124bf56dd69479fd9454.tar.gz uGFX-5f903622616a2f1686f3124bf56dd69479fd9454.tar.bz2 uGFX-5f903622616a2f1686f3124bf56dd69479fd9454.zip |
touchscreen fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/touchscreen.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/touchscreen.c b/src/touchscreen.c index 7c2ec34f..d7abbe30 100644 --- a/src/touchscreen.c +++ b/src/touchscreen.c @@ -159,7 +159,6 @@ static void _tsDo3PointCalibration(const coord_t (*cross)[2], coord_t (*points)[ * @api
*/
void tsInit(const TouchscreenDriver *ts) {
-
/* Initialise Mutex */
//MUTEX_INIT
@@ -177,6 +176,7 @@ void tsInit(const TouchscreenDriver *ts) { cal = (struct cal_t*)chHeapAlloc(NULL, sizeof(struct cal_t));
if(cal == NULL)
return;
+
tsCalibrate();
}
@@ -206,9 +206,9 @@ coord_t tsReadX(void) { case GDISP_ROTATE_90:
return y;
case GDISP_ROTATE_180:
- return gdispGetWidth() - x - 1;
+ return GDISP_SCREEN_WIDTH - x - 1;
case GDISP_ROTATE_270:
- return gdispGetHeight() - y - 1;
+ return GDISP_SCREEN_HEIGHT - y - 1;
}
return 0;
@@ -238,9 +238,9 @@ coord_t tsReadY(void) { case GDISP_ROTATE_0:
return y;
case GDISP_ROTATE_90:
- return gdispGetWidth() - x - 1;
+ return GDISP_SCREEN_WIDTH - x - 1;
case GDISP_ROTATE_180:
- return gdispGetHeight() - y - 1;
+ return GDISP_SCREEN_HEIGHT - y - 1;
case GDISP_ROTATE_270:
return x;
}
|