mirror of
https://github.com/apache/nuttx.git
synced 2026-10-06 13:55:15 +00:00
LPC17xx ADC: Configure all ADC pins in the set, not just one. From MKannan
This commit is contained in:
parent
803a860d34
commit
a3efe72f78
1 changed files with 7 additions and 7 deletions
|
|
@ -174,31 +174,31 @@ static void adc_reset(FAR struct adc_dev_s *dev)
|
|||
{
|
||||
lpc17_configgpio(GPIO_AD0p0);
|
||||
}
|
||||
else if ((priv->mask & 0x02) != 0)
|
||||
if ((priv->mask & 0x02) != 0)
|
||||
{
|
||||
lpc17_configgpio(GPIO_AD0p1);
|
||||
}
|
||||
else if ((priv->mask & 0x04) != 0)
|
||||
if ((priv->mask & 0x04) != 0)
|
||||
{
|
||||
lpc17_configgpio(GPIO_AD0p2);
|
||||
}
|
||||
else if ((priv->mask & 0x08) != 0)
|
||||
if ((priv->mask & 0x08) != 0)
|
||||
{
|
||||
lpc17_configgpio(GPIO_AD0p3);
|
||||
}
|
||||
else if ((priv->mask & 0x10) != 0)
|
||||
if ((priv->mask & 0x10) != 0)
|
||||
{
|
||||
lpc17_configgpio(GPIO_AD0p4);
|
||||
}
|
||||
else if ((priv->mask & 0x20) != 0)
|
||||
if ((priv->mask & 0x20) != 0)
|
||||
{
|
||||
lpc17_configgpio(GPIO_AD0p5);
|
||||
}
|
||||
else if ((priv->mask & 0x40) != 0)
|
||||
if ((priv->mask & 0x40) != 0)
|
||||
{
|
||||
lpc17_configgpio(GPIO_AD0p6);
|
||||
}
|
||||
else if ((priv->mask & 0x80) != 0)
|
||||
if ((priv->mask & 0x80) != 0)
|
||||
{
|
||||
lpc17_configgpio(GPIO_AD0p7);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue