SAMA5D4-EK: PIO Schmitt trigger logic backward

This commit is contained in:
Gregory Nutt 2014-07-20 13:04:30 -06:00
parent 78d7925ce0
commit 7fa1eec246

View File

@ -337,16 +337,18 @@ static inline int sam_configinput(uintptr_t base, uint32_t pin,
}
#ifdef PIO_HAVE_SCHMITT
/* Enable/disable the Schmitt trigger */
/* Enable/disable the Schmitt trigger: Zero enables. Schmitt triggered
* inputs are enabled by default.
*/
regval = getreg32(base + SAM_PIO_SCHMITT_OFFSET);
if ((cfgset & PIO_CFG_SCHMITT) != 0)
{
regval |= pin;
regval &= ~pin;
}
else
{
regval &= ~pin;
regval |= pin;
}
putreg32(regval, base + SAM_PIO_SCHMITT_OFFSET);