mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
SAMA5: Touchscreen driver now works
This commit is contained in:
@@ -649,8 +649,11 @@ static void sam_tsd_bottomhalf(void *arg)
|
||||
* wait until it is.
|
||||
*/
|
||||
|
||||
if ((priv->valid & TSD_ALLREADY) == TSD_ALLREADY)
|
||||
if ((priv->valid & TSD_ALLREADY) != TSD_ALLREADY)
|
||||
{
|
||||
goto ignored;
|
||||
}
|
||||
|
||||
/* Clear data ready bits in the data validity bitset */
|
||||
|
||||
priv->valid = 0;
|
||||
@@ -693,15 +696,12 @@ static void sam_tsd_bottomhalf(void *arg)
|
||||
* pressure also generate a event?
|
||||
*/
|
||||
|
||||
xdiff = x > priv->threshx ? (x - priv->threshx) :
|
||||
(priv->threshx - x);
|
||||
ydiff = y > priv->threshy ? (y - priv->threshy) :
|
||||
(priv->threshy - y);
|
||||
xdiff = x > priv->threshx ? (x - priv->threshx) : (priv->threshx - x);
|
||||
ydiff = y > priv->threshy ? (y - priv->threshy) : (priv->threshy - y);
|
||||
|
||||
/* Continue to sample the position while the pen is down */
|
||||
|
||||
wd_start(priv->wdog, TSD_WDOG_DELAY, sam_tsd_expiry,
|
||||
1, (uint32_t)priv);
|
||||
wd_start(priv->wdog, TSD_WDOG_DELAY, sam_tsd_expiry, 1, (uint32_t)priv);
|
||||
|
||||
/* Check the thresholds. Bail if (1) this is not the first
|
||||
* measurement and (2) there is no significant difference from
|
||||
@@ -774,7 +774,6 @@ static void sam_tsd_bottomhalf(void *arg)
|
||||
sam_adc_putreg(priv->adc, SAM_ADC_TRGR, regval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Indicate the availability of new sample data for this ID */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user