renamed tsIRQ() into tsPressed()

ugfx_release_2.6
Joel Bodenmann 2012-11-10 16:46:02 +01:00
parent cc5ae04b7b
commit 5a5db64288
6 changed files with 12 additions and 12 deletions

View File

@ -546,7 +546,7 @@ uint16_t ts_lld_read_z(void) {
* *
* @notapi * @notapi
*/ */
uint8_t ts_lld_irq(void) { uint8_t ts_lld_pressed(void) {
return (uint8_t)mousedn; return (uint8_t)mousedn;
} }

View File

@ -213,13 +213,13 @@ uint16_t ts_lld_read_y(void) {
/* ---- Optional Routines ---- */ /* ---- Optional Routines ---- */
#if TOUCHSCREEN_HAS_IRQ || defined(__DOXYGEN__) #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 * @return 1 if pressed / 0 if not pressed
* *
* @notapi * @notapi
*/ */
uint8_t ts_lld_irq(void) { uint8_t ts_lld_pressed(void) {
return (!palReadPad(tsDriver->tsIRQPort, tsDriver->tsIRQPin)); return (!palReadPad(tsDriver->tsIRQPort, tsDriver->tsIRQPin));
} }
#endif #endif

View File

@ -219,7 +219,7 @@ uint16_t ts_lld_read_y(void) {
* *
* @notapi * @notapi
*/ */
uint8_t ts_lld_irq(void) { uint8_t ts_lld_pressed(void) {
return (!palReadPad(tsDriver->tsIRQPort, tsDriver->tsIRQPin)); return (!palReadPad(tsDriver->tsIRQPort, tsDriver->tsIRQPin));
} }
#endif #endif

View File

@ -82,7 +82,7 @@ coord_t tsReadY(void);
void tsCalibrate(void); void tsCalibrate(void);
#if TOUCHSCREEN_HAS_IRQ #if TOUCHSCREEN_HAS_IRQ
bool_t tsIRQ(void); bool_t tsPressed(void);
#endif #endif
#if TOUCHSCREEN_HAS_PRESSURE #if TOUCHSCREEN_HAS_PRESSURE

View File

@ -137,7 +137,7 @@ extern "C" {
uint16_t ts_lld_read_y(void); uint16_t ts_lld_read_y(void);
#if TOUCHSCREEN_HAS_IRQ #if TOUCHSCREEN_HAS_IRQ
uint8_t ts_lld_irq(void); uint8_t ts_lld_pressed(void);
#endif #endif
#if TOUCHSCREEN_HAS_PRESSURE #if TOUCHSCREEN_HAS_PRESSURE

View File

@ -270,8 +270,8 @@ coord_t tsReadY(void) {
* @api * @api
*/ */
#if TOUCHSCREEN_HAS_IRQ || defined(__DOXYGEN__) #if TOUCHSCREEN_HAS_IRQ || defined(__DOXYGEN__)
bool_t tsIRQ(void) { bool_t tsPressed(void) {
return ts_lld_irq(); return ts_lld_pressed();
} }
#endif #endif
@ -311,7 +311,7 @@ calibrate:
#endif #endif
_tsDrawCross(cross[i][0], cross[i][1]); _tsDrawCross(cross[i][0], cross[i][1]);
while(!tsIRQ()) while(!tsPressed())
chThdSleepMilliseconds(2); /* Be nice to other threads*/ chThdSleepMilliseconds(2); /* Be nice to other threads*/
chThdSleepMilliseconds(20); /* Allow screen to settle */ chThdSleepMilliseconds(20); /* Allow screen to settle */
@ -321,8 +321,8 @@ calibrate:
px = py = 0; px = py = 0;
j = 0; j = 0;
while (j < MAX_CAL_SAMPLES) { while(j < MAX_CAL_SAMPLES) {
if (tsIRQ()) { if(tsPressed()) {
/* We have valid pointer data */ /* We have valid pointer data */
px += _tsReadRealX(); px += _tsReadRealX();
py += _tsReadRealY(); py += _tsReadRealY();
@ -336,7 +336,7 @@ calibrate:
chThdSleepMilliseconds(100); chThdSleepMilliseconds(100);
while(tsIRQ()) while(tsPressed())
chThdSleepMilliseconds(2); /* Be nice to other threads*/ chThdSleepMilliseconds(2); /* Be nice to other threads*/
gdispFillArea(cross[i][0] - 15, cross[i][1] - 15, 42, 42, Blue); gdispFillArea(cross[i][0] - 15, cross[i][1] - 15, 42, 42, Blue);