diff options
author | Joel Bodenmann <joel@unormal.org> | 2012-11-10 16:46:02 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2012-11-10 16:46:02 +0100 |
commit | 5a5db64288414162a31a7e755757c32ddf55bf6c (patch) | |
tree | 3a86993c6bd65f894642e9484a005fc340cec66f | |
parent | cc5ae04b7bba81739bf9b8f5c9a79ea98e6e9319 (diff) | |
download | uGFX-5a5db64288414162a31a7e755757c32ddf55bf6c.tar.gz uGFX-5a5db64288414162a31a7e755757c32ddf55bf6c.tar.bz2 uGFX-5a5db64288414162a31a7e755757c32ddf55bf6c.zip |
renamed tsIRQ() into tsPressed()
-rw-r--r-- | drivers/gdisp/Win32/gdisp_lld.c | 2 | ||||
-rw-r--r-- | drivers/touchscreen/ADS7843/touchscreen_lld.c | 4 | ||||
-rw-r--r-- | drivers/touchscreen/XPT2046/touchscreen_lld.c | 2 | ||||
-rw-r--r-- | include/touchscreen.h | 2 | ||||
-rw-r--r-- | include/touchscreen_lld.h | 2 | ||||
-rw-r--r-- | src/touchscreen.c | 12 |
6 files changed, 12 insertions, 12 deletions
diff --git a/drivers/gdisp/Win32/gdisp_lld.c b/drivers/gdisp/Win32/gdisp_lld.c index 4cf69b0e..69e90e89 100644 --- a/drivers/gdisp/Win32/gdisp_lld.c +++ b/drivers/gdisp/Win32/gdisp_lld.c @@ -546,7 +546,7 @@ uint16_t ts_lld_read_z(void) { *
* @notapi
*/
-uint8_t ts_lld_irq(void) {
+uint8_t ts_lld_pressed(void) {
return (uint8_t)mousedn;
}
diff --git a/drivers/touchscreen/ADS7843/touchscreen_lld.c b/drivers/touchscreen/ADS7843/touchscreen_lld.c index 98e25383..15b1d907 100644 --- a/drivers/touchscreen/ADS7843/touchscreen_lld.c +++ b/drivers/touchscreen/ADS7843/touchscreen_lld.c @@ -213,13 +213,13 @@ uint16_t ts_lld_read_y(void) { /* ---- Optional Routines ---- */
#if TOUCHSCREEN_HAS_IRQ || defined(__DOXYGEN__)
/*
- * @brief for checking if touchpad is pressed or not.
+ * @brief for checking if touchscreen is pressed or not.
*
* @return 1 if pressed / 0 if not pressed
*
* @notapi
*/
- uint8_t ts_lld_irq(void) {
+ uint8_t ts_lld_pressed(void) {
return (!palReadPad(tsDriver->tsIRQPort, tsDriver->tsIRQPin));
}
#endif
diff --git a/drivers/touchscreen/XPT2046/touchscreen_lld.c b/drivers/touchscreen/XPT2046/touchscreen_lld.c index 90bf0032..ef410b0d 100644 --- a/drivers/touchscreen/XPT2046/touchscreen_lld.c +++ b/drivers/touchscreen/XPT2046/touchscreen_lld.c @@ -219,7 +219,7 @@ uint16_t ts_lld_read_y(void) { *
* @notapi
*/
- uint8_t ts_lld_irq(void) {
+ uint8_t ts_lld_pressed(void) {
return (!palReadPad(tsDriver->tsIRQPort, tsDriver->tsIRQPin));
}
#endif
diff --git a/include/touchscreen.h b/include/touchscreen.h index 4d48e38d..65c6400f 100644 --- a/include/touchscreen.h +++ b/include/touchscreen.h @@ -82,7 +82,7 @@ coord_t tsReadY(void); void tsCalibrate(void); #if TOUCHSCREEN_HAS_IRQ - bool_t tsIRQ(void); + bool_t tsPressed(void); #endif #if TOUCHSCREEN_HAS_PRESSURE diff --git a/include/touchscreen_lld.h b/include/touchscreen_lld.h index 53c66b53..ab035ae3 100644 --- a/include/touchscreen_lld.h +++ b/include/touchscreen_lld.h @@ -137,7 +137,7 @@ extern "C" { uint16_t ts_lld_read_y(void); #if TOUCHSCREEN_HAS_IRQ - uint8_t ts_lld_irq(void); + uint8_t ts_lld_pressed(void); #endif #if TOUCHSCREEN_HAS_PRESSURE diff --git a/src/touchscreen.c b/src/touchscreen.c index b6a1a0c3..7c2ec34f 100644 --- a/src/touchscreen.c +++ b/src/touchscreen.c @@ -270,8 +270,8 @@ coord_t tsReadY(void) { * @api
*/
#if TOUCHSCREEN_HAS_IRQ || defined(__DOXYGEN__)
- bool_t tsIRQ(void) {
- return ts_lld_irq();
+ bool_t tsPressed(void) {
+ return ts_lld_pressed();
}
#endif
@@ -311,7 +311,7 @@ calibrate: #endif
_tsDrawCross(cross[i][0], cross[i][1]);
- while(!tsIRQ())
+ while(!tsPressed())
chThdSleepMilliseconds(2); /* Be nice to other threads*/
chThdSleepMilliseconds(20); /* Allow screen to settle */
@@ -321,8 +321,8 @@ calibrate: px = py = 0;
j = 0;
- while (j < MAX_CAL_SAMPLES) {
- if (tsIRQ()) {
+ while(j < MAX_CAL_SAMPLES) {
+ if(tsPressed()) {
/* We have valid pointer data */
px += _tsReadRealX();
py += _tsReadRealY();
@@ -336,7 +336,7 @@ calibrate: chThdSleepMilliseconds(100);
- while(tsIRQ())
+ while(tsPressed())
chThdSleepMilliseconds(2); /* Be nice to other threads*/
gdispFillArea(cross[i][0] - 15, cross[i][1] - 15, 42, 42, Blue);
|