mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 12:08:36 +08:00
Only use PCLKSEL0 for ADC on LPC176x family.
This commit is contained in:
parent
9ae6140b5a
commit
835b5e9d6f
1 changed files with 3 additions and 0 deletions
|
@ -213,10 +213,13 @@ static void adc_reset(FAR struct adc_dev_s *dev)
|
|||
|
||||
putreg32(ADC_CR_PDN, LPC17_40_ADC_CR);
|
||||
|
||||
/* PCLKSEL0 only exists in LPC176x family parts */
|
||||
#ifdef LPC176x
|
||||
regval = getreg32(LPC17_40_SYSCON_PCLKSEL0);
|
||||
regval &= ~SYSCON_PCLKSEL0_ADC_MASK;
|
||||
regval |= (SYSCON_PCLKSEL_CCLK8 << SYSCON_PCLKSEL0_ADC_SHIFT);
|
||||
putreg32(regval, LPC17_40_SYSCON_PCLKSEL0);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC17_40_ADC_BURSTMODE
|
||||
clkdiv = LPC17_40_CCLK / 3 / 65 / priv->sps;
|
||||
|
|
Loading…
Reference in a new issue